4 ms·
something I never understood is why not compile-time C semantics and proprocessor and actually enforce some compiler optimizations ? This is basically the dire
by makapuf 10y ago
something I never understood is why not compile-time C semantics and proprocessor and actually enforce some compiler optimizations ?
This is basically the direction of constexpr in fact with C++.
I would love a new, slightly fixed/incompatible C17 (not D or subpart of C++, just C11) with
- c++17-like constexpr (and its uses anywhere : switch cases, array sizes.. )
- deprecated oldstyle args, undeclared functions, trigraphs
- (templates can be mostly done with pure inlining+constexpr)
- better keywords (static -> private (by default/explicit public), persist )
- fixed operators precedence (1<<3 +1=16 yay)
- typed enums with explicit storage class
- reduce preprocessor ability(discourage and just generate from lua/python/C programs if you really need, maybe with a shebang-like line). replace conditional compilation with constexpr ifs,