2 ms·
You can also get algebraic sum types in C with the C preprocessor: https://github.com/Hirrolot/datatype99 https://github.com/Hirrolot/datatype99 But of course
by vlovich123 2y ago
You can also get algebraic sum types in C with the C preprocessor: https://github.com/Hirrolot/datatype99 https://github.com/Hirrolot/datatype99
But of course defaults matter and the kernel’s rich history of not modernizing coding practices is going to work against improvements in C land. Ironically, it’s that same resistance that frustrates the Rust devs so much because their resistant to even cleaning up their own subsystems or putting down markers documenting how the subsystems are supposed to work.
Maybe https://github.com/llvm/llvm-project/issues/74205 https://github.com/llvm/llvm-project/issues/74205 would help once it trickles down into the kernel, but I suspect that people are still going to choose to do this manual overloading of the pointer instead of using types for safety.