‹ BackHN Continuity

Thread

C's Flexible Integer Sizes Were Not a Design Mistake

113 points · 166 comments · ibobev

  1. quelsolaar · · focus · HN ↗
    Good article.

    C would probably not have survived unless it had this flexibility.

    But its not justa historical thing. Today there are modern platforms like DSPs that have 32bit sized char, because that is the smallest addressable type. These platforms depend on C for tool chains, even if most "portable" C wont run correctly on them. The fact that you can build hardware like that, and not have to invent a new language / dialect to program them is a huge win for the world.

    <edit> I didnt see the footnote about DSPs at first read </edit>

    1. pjmlp · · focus · HN ↗
      C survived because UNIX carried it.
      1. i2talics · · focus · HN ↗
        I have had the suspicion for a while now, that any attempted discussions about the merits of C's design that try to connect this to its success, are missing a massive part of the picture if they don't mention UNIX.

        We don't make this mistake about JavaScript; nobody tries to argue that the confusing semantics of the "var" keyword or the "==" operator somehow were actually instrumental to its success. It's obvious that JavaScript won because it was what was on the web. Maybe C is not much different.

        1. pjmlp · · focus · HN ↗
          It isn't, most languages win because of a platform that comes with them, or a product, no language has ever won on their own, plain grammar, semantics and standard library without anything else.

          JavaScript and Web, UNIX and C, UNIX/Windows/Mac OS/OS/2 and C++, Ruby and Rails, Zope and Python, Tcl and AOLServer/Vignette, Windows and VB, 8 bit computer ROMs and BASIC, and so on.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.