5 ms·
If you're using macros or another language entirely to generate C code, it's often to preserve type safety. Otherwise it's often easier to typecast everything t
by wahern 7y ago
If you're using macros or another language entirely to generate C code, it's often to preserve type safety. Otherwise it's often easier to typecast everything through void pointers.
It's the same situation with Go, so it's not like C is entirely anachronistic with regards to the trade-offs it makes.
- pjmlp 7y agoMacros and type safety don't really go hand in hand, hence why ISO C++ is progressively removing any reason to still use them beyond conditional compilation. Go, just like C, is stuck on a by gone era of programming languages.