4 ms·
I wish that were true, unfortunately C++ is copying many of the superficial aspects of D and making many mistakes along the way mostly because of the bitter pis
by Kranar 5y ago
I wish that were true, unfortunately C++ is copying many of the superficial aspects of D and making many mistakes along the way mostly because of the bitter pissing contest that exists between the two communities and can largely be traced back to this paper:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3613.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n361...
Admittedly there are a ton of things I don't like about D and overall I find the language to be quite unprincipled and just a kitchen sink of poor mismatched features... but certainly there are some things D does exceptionally well and C++ should have learned from them to avoid about a decade worth of lost productivity.
Things like modules, ranges, template constraints, static if, compile time execution are all much cleaner in D than what C++ has and with every new C++ standard it turns out that things are broken, defect reports have to be published, there are serious quality of implementation issues and the features just don't work as well in actual production grade projects compared to the tiny and artificial examples one reads in a blog post to show off the feature.
But it's taboo to learn from D, or virtually any other language, with the mantra that "C++ is not like other languages, it's just soooo unique and special that what works for language Foo won't possibly work for C++." and so instead C++ has to reinvent everything in a half-assed manner and repeat many mistakes that others have already learned from.
- CRConrad 5y agoHmm... Weird: > The feature provides a single syntax with three distinct semantics, depending on the context of use. Following immediately after > ...fundamentally flawed, and its adoption would be a disaster for the language. as it does, one could almost think he means that's a bad thing. And then: > This will make programs harder to read, understand, maintain, and debug. Yeah, so what -- isn't that what C++ is all about?
- thedracle 5y agoI definitely agree with the general mantra that C++ is special, and bullheadedness about doing things differently. But I do also know from experience that walking the line of evolving language features in a compiler taking into consideration prior legacy decisions is extremely difficult. I think more than it being a pissing contest, I interpret there are practical considerations the C++ Standards Committee is considering in terms of performance, ease of implementation, and interaction with legacy features.