‹ BackHN Continuity

Thread

C's Flexible Integer Sizes Were Not a Design Mistake

113 points · 166 comments · ibobev

  1. pjmlp · · focus · HN ↗
    Kind of, the mistake was not doing like PL/I where besides default machine specific sizes, the developer could explicitly assert the required sizes.
    1. Alpha3031 · · focus · HN ↗
      I thought most implementations of C have stdint (intN_t, leastN_t and fastN_t etc).
      1. flohofwoe · · focus · HN ↗
        These are C99 features which MSVC only got around 2015 (of course a decade later those are safe to use in portable code).
        1. someonebaggy · · focus · HN ↗
          They're also in C++11. When did MSVC get that? Is it also possible they got it before the C++11 standard? And of course Microsoft has its own different spellings: BYTE, WORD, DWORD, QWORD
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.