4 ms·
"it's been solvable with anything from a shell script to something more complicated forever" By this logic C as good as any language as long as you can compile
by gdy 7y ago
"it's been solvable with anything from a shell script to something more complicated forever"
By this logic C as good as any language as long as you can compile that language to C.
- flukus 7y agoThe logic is more "why add complicated features to a language when there are existing ways to have the same functionality". C++ is already over complicated, the last thing it needs are more features. This effort is also being replicated across several languages with all there own syntax and warts. Generating source code via a script or template library is much more compositional.
- pjmlp 7y agoAnd more error prone, while a type system enforces correctness.
- wahern 7y agoIf 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.
- gdy 7y agoI'm not sure if adding an additional language or two to C makes the codebase simpler than pure C++ code. What's more, I've witnessed quite a few times the code generating program becoming incomprehensible after more and more parts of the code gets generated conditionally.