Comment Re:As a C programmer (Score 3, Informative) 315
Also worth mentioning that not only does C run on the most different processors, C is the most portable between languages.....that is, if you write a library in C, it can be used in basically every other language.
There can actually be surprising gotchas regarding portability. Good examples:
- - dereferencing pointers to multi-byte values can cause errors on some processors when the pointer address isn't word-aligned, but will work just fine on others
- - you can't make any assumptions around native word sizes without risking portability issues. This means being very explicit with your types (including <stdint.h> and being super careful about explicitly casting while bit shifting
- -
That's definitely not to say that you *can't* write portable code, just that C libraries may not be as plug-and-play as you'd like, often in surprising and dangerous ways.