While I'm a caveman who appreciate the very simple environment which is C, there are some features, mainly semantic, missing from C which are kind of obvious and doesn't really complicate things much but ends up being very useful for long-term projects (example: overloads).
So I'm wondering, if you could extend C with tiny features like these without turning it into a complex mess like C++, what would you add?
Here are some examples that I have thought of:
- Function overloads
- Runtime type reflection (enum names, member info, type sizes, kinds etc)
- Better error messages
- Strict enums
- Jai/Odin-like compile-time arguments (this one is less trivial, and can cause C++ moments)
- No declaration order
- Built in vector & matrix base types that we can use arithmetic operators on