by nynx · 5y ago · 0 comments
I don't care about RAII, so I don't care about the ownership tracking that Rust provides. I like to think that memory management is actually part of the problem, rather than a responsibility for the language's runtime.
I want to generate hundreds of datastructures or algorithms at compile time that are optimal in specific situations using introspection of types.
I want everything else in the language to get out of the way and know that I'm writing code that actually runs on a real computer, not an abstract machine.
Plus, inheriting abstract interface classes is more convenient than writing a vtable by hand when such a thing makes sense. You don't have to participate in Java-style class voodoo if you don't want to.
I am sure all the other languages mentioned like Rust, Zig, and D are very good too, but C++ is where all the high-performance libraries live, and whatever productivity gains I would get by switching languages is utterly dwarfed by that.
We could use more safety even, like automatic race condition analysis in language and more.
Conservative extensions of C and C++ exist, and they're not very popular, just check how popular D is...
As a comparison, has Python decided what it wanted to be? A scripting language like Perl, data processing language like R, tool command language like TCL or web backend programming language like PHP or RoR? But nobody in their right mind will ever say Python need to decide on his direction when it grows old.
As you probably have known when Python is around 20 years old (like D today), it played second or third fiddle to PHP, TCL, Ruby (RoR), Perl and R in their respective domains, and at the time the growing pain into Python 3 is yet to happen. But looks where is it now?
Personally I think the D language foundation is already solid [1]. It just need a killer application for it to be more popular and well-known just like what RoR did to Ruby. And if you have a solid foundation, it will probably just a matter of time for it to properly take off.
Which features do you recommend we deprecate?
https://github.com/attractivechaos/klib/blob/master/khash.h
https://github.com/attractivechaos/klib/blob/master/kvec.h
FWIW writing a generic vector like that ^^^ is going to be faster than almost any std::vector implementation you can find. And that is just one way to do it, there are other tricks.
The actual logic of a B*-tree would be equally hard in any language. The macroized template part is easy.