3 ms·
A very surface change (almost syntactic sugar) that would be neat for me is some form of generics. Specifically, to allow me to implement an algorithm once for
by stncls 3y ago
A very surface change (almost syntactic sugar) that would be neat for me is some form of generics. Specifically, to allow me to implement an algorithm once for different data types. Right now I do it with preprocessor macros and includes; it works but feels wrong.
Going deeper, but not as far as changing the language (not hoping for memory safety here), I would like better research and documentation for undefined behavior (UB).
I'm not completely opposed to UB. I understand it is an unfortunate performance/safety trade-off that's not fully avoidable in a historical language like C. However, there are many types of UB, and for a few of them, the performance benefits feel theoretical (not supported by empirical evidence). I would love some before/after benchmarks with the types of UB that can be disabled in the compiler, and some open-minded discussion afterwards.