Skip to content

Instantly share code, notes, and snippets.

@hikari-no-yume
Created August 11, 2014 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hikari-no-yume/b0ae42549afa476e3027 to your computer and use it in GitHub Desktop.
Save hikari-no-yume/b0ae42549afa476e3027 to your computer and use it in GitHub Desktop.
Problems with C
  1. Prototypes and headers. Get rid of them.
  2. Integer types. To be fair, it's not really a language problem, rather a compiler/platform issue:
    • char - almost universally 8-bit
    • short - almost universally 16-bit
    • int - supposed to be 16-bit, in practise 32-bit
    • long - supposed to be 32-bit, in practise 64-bit on UNIX-likes on AMD64
    • long long - always 64-bit

I'd make char 8-bit, short 16-bit, int 32-bit and long 64-bit consistently. long int would be removed. char would always be signed. 3. Other stuff I forgot welp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment