4 ms·
I want a C with templates (with support for C++20 concepts) and consteval, instead of a C with classes (C++) I don't care about RAII, so I don't care about the
by typon 5y ago
I want a C with templates (with support for C++20 concepts) and consteval, instead of a C with classes (C++)
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.
- cmrdporcupine 5y agoSounds like you might like Zig.
- typon 5y agoNever gave it an honest look, maybe I should spend some time learning it
- AstralStorm 5y agoAny argument that starts with "I don't care about safety" is a bad idea. 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...
- mhh__ 5y agoD is that language, especially wrt to the code generation. Code generation and metaprogramming is what we obsess over.
- pjmlp 5y agoI am afraid D slowly needs to decide what it wants to be when it grows old.
- mhh__ 5y agoLike what? The company I work for has business logic, numerical code, a functional DSL, bindings to just about everything needed, fast and introspectable because they are under the same language. Which features do you recommend we deprecate?
- pjmlp 5y agoIt is more like finalize the unstable features, stop chasing other languages memory models, fix type system holes, no incomplete DIP implementations.
- teleforce 5y agoCan you please elaborate what kind of decision to make on D? It's a general purpose programming language with excellent metaprogramming capability. 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. [1]https://dl.acm.org/doi/pdf/10.1145/3386323 https://dl.acm.org/doi/pdf/10.1145/3386323
- pjmlp 5y agoAn excellent language that keeps being rebooted with endless discussions on memory models, incomplete features, DIPs that were half implemented without documentation. While they don't know where it should go, C#, C++, Swift keep adopting D like features, with their rich ecosystem. D could have been C# on Unity, given Remedy experience with the language, instead not. D's Metaprogramming was great 10 years ago, not when placed against C++20 metaprogramming, or the features arriving in C++23.
- krapht 5y agoEvery time I read this, I agree. And then I wonder why people don't do the obvious thing like I do and write C with templates in C++. It is a kitchen-sink multi-paradigm language so just embrace it. 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.