‹ 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. imtringued · · focus · HN ↗
      Not sure why you would need to invent an new programming language when we're still strictly talking about data types. You just introduce a new data type for the hardware if that's what's necessary. You don't need a whole language.

      This is why I think so many C developers have no clue what they are doing. They just take whatever decision was made in C as gospel instead of thinking of everything being up for negotiation.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.