@radehi Actually in the STL there are many types that are quite useful, but that could be really well done if only we had classes and templates in C99 as suggested by @ilpincy .
But that's the case, is there a "C with classes"? Maybe the first definition on C++ was an idea like that.
I say all pf this because in moat of my use cases I use plain C features (I code mostly wrappers).
@radehi @abde I have used C++ for about 15 years now, and still do. For most of my projects I prefer C. C is old, sure, and has severe defects (macros!). But the complexity of C++23 is seldom worth my time. I dream of a language with the simplicity of C but the expressive power of C++. That's why "C with templates and multiple dispatch" is something I'd love to see made. Maybe one day I'll just find the time to try out the idea myself 🤔
@ilpincy @abde I think a lot of the programming language design space remains unexplored. In large part is because many of the big wins at the language level happened early (named variables, automatic jump address calculation, infix expressions, conditionals, functions, garbage collection, dynamic typing) and, except for experimentation, reuse commonly trumps potential linguistic advantages.
To be concrete, is better to use OpenCV than to reimplement it in a better language.
@abde @ilpincy Yep. The authors of Golang and their colleagues previously did some class-like stuff in C in libraries like sfio; was relatively common for that kind of thing to beat C++ with STL on performance 20 years ago, less so now.