News for hackers. Stuff that matters.
Re:Implementing Generic Types in C by huhtenberg on Wednesday March 19, 2025 @03:21PM (#43416252)
Not sure why the parent is in gray. It's a perfectly valid and widely practiced approach.
Re:Implementing Generic Types in C by codr7 on Wednesday March 19, 2025 @04:36PM (#43417018)
How often it works out as intended is very much up for debate though.
Re:Implementing Generic Types in C by jimbob45 on Wednesday March 19, 2025 @05:09PM (#43417355)
For legacy codebases, switching the compiler is certainly out of the question. For everyone else, why do you think it would be an issue to use the C++ compiler?
Re:Implementing Generic Types in C by codr7 on Wednesday March 19, 2025 @05:55PM (#43417700)
Because the complexity seeps in through the cracks, and with the language comes a mindset; same reasons Linus is wary about C++ in the kernel.

Some say it works; I've never succeeded, even on solo projects.

Re:Implementing Generic Types in C by krapp on Wednesday March 19, 2025 @09:07PM (#43418961)
I think this is the general style for the Godot framework. They use a limited subset of C++, avoiding STL and some modern features, and limited templates.