On Monday, 29 June 2020 at 12:17:57 UTC, Russel Winder wrote:
Of course C++ is now really a niche language used by those who still use it and do not move on to more modern languages!
I am a C++ developer. I do want to move to a modern language, but there is no one that fits my needs. Rust has a very promising ownership-borrowing concept but the lack of OOP and its awful syntax (mostly because of lifetimes) make it a no go for me. Go is just an oversimplified language. No generics/teplates in 2020, seriously? D has a GC. If you turn it off you lose dynamic/associative arrays, classes, probably something else. Why would I even want to use such language at all? It's much easier to stay with C++ this way, since it has lots of C/C++ libraries, IDEs, tools, broad community, support of big companies.
The problem is backward compatibility. Every new feature in C++ requires backward compatibility with all previous C++, leading to a more and more complex language.
Totally agree. It would be much better if C++ was redesigned from scratch, dropping backward compatibility and making things better: explicit constructors/operators by default, default-initialized variables, const by default, and maybe even move semantics by default. You can explicitly copy an object if you want, but only when you really need it. We don't need 3 ways of initialization, lots of different reference types, implicit casts between different integer types, interpreting arrays as pointers, etc.
Clearly Modern C++, aka C++11, was a great innovation and step forward. C++14, C++17, and I guess C++20 move the language forward.
C++20 is a big improvement at least because of concepts, coroutines, and ranges.
On the other hand people are stopping using C++ in favour of Go, Rust, Python, but it seems not D.
Of course, since D doesn't look like a mature language. I've been following it for many years and it doesn't really improve. It looks just like a bunch of different things/concepts put together. Many things are stalled without of any progress because there is no consensus. The entire DIP process is not good. There is no way to find the current DIP status, no way to learn when and whether it's going to be implemented or not. Have you noticed such questions in the forum recently? The current status of the language is unclear. Sometimes there is only one way to find out why it behaves like it does: to ask in this forum. And you may not like the answers. D has transitive const, but what if I should lazy evaluate/cache a value or use a mutex? If I shouldn't use const, how should I emphasize the intention to pass a pointer only for reading? How can I be sure that my class invariant is not compromised? Also, there is the shared attribute, but it isn't designed nor implemented well. Lots of questions, no solutions. D is intended to be a C++ replacement, but it doesn't explain to C++ programmers how to change their way of thinking. I'd appreciate if there was a document that explains typical tasks and ways to get them done in D for the C++ dummies, like me. Maintainers don't like to make breaking changes when they are required. Come on guys, it's called an evolution. That's why C++ is so overcomplicated right now. It tries to keep backward compatibility at all costs. I hope you don't want D to get into the same situation? Any modern language requires a chance to evolve. Sometimes you just have to break something. And making it once in a year (or 2-3 years) doesn't look like a bad option to me.
