by harry8 · 5y ago · 0 comments
It's a fun exercise to think about how you would do C++ fresh starting with ansi C, given what you know now based on the actual experiences of C++, Java, D, Rust etc. C++ has had a tendency to attempt to solve the current problem while being tightly coupled to it, problems which may not even exist later. I submit STL allocators as an example of this.
What's the best way of enforcing taste? Slow down the changes, put barriers in the way? That's horrible, sure, but is there something better? Benign Dictator maybe? Bjarne's taste has improved considerably (and I'm sure I could have made a bigger hash of it than he did starting out too).
Isn't C++ an example of a language that moves slowly and still has lots of bolted on features? Having used it a bit, I would use Rust as an example of a language whose features are very thoughtfully considered and not "bolted on" at all.
If we're just looking at C++ and Rust and drawing conclusions, I would expect the conclusion would be "moving super slowly correlates with more bolted on features, not fewer".
I think it's more likely that Rust just benefited from lots of hindsight with respect to C++'s mistakes.
Note also that since C++11, the language has been evolving quite quickly and the features released since have been some of the most thoughtful.
By 1985 C++ has a published book describing the language (which I still own somewhere, it's terrible) and a commercial implementation as well as Stroustrup's code.
While in June 2011 Rust isn't even "pre-alpha" and is just learning how to bootstrap.
For example Rust's GPU support is not great right now - and it may very well feel bolted on a few years down the line.
Rust has it's dangerous, unsafe warts. As someone learning rust, finding out that string slices can cause panics was utterly shocking to me. string slices should have had character indices not byte indices. This was a feature that was NOT thought of carefully. It completely goes against Rust's philosophy as a "safe", catch-errors-at-compile language.
Now, despite the big changes of C++11 as the watershed it has slowed and is doing better for it. Correlated? Maybe. Good taste should also slow the rate of change of "What do I have to deal with as a programmer in this language?" Also if the original language design that people found good enough to use was done really well then it shouldn't need too much change on top of it?
Point taken, you can use C++ as an example for anything. Even opposing points. It really has it all! (Like it or not)
Not many languages take C's ultra-high-inertia approach. Perhaps Scheme and Forth.
Most people using it will probably also claim it is a feature rather than a handicap.
Reminder that Ada already had modules (Packages) almost a decade ago.
I don't know Ada as well as I know C and C++, but I believe Ada lands somewhere between C and C++ in terms of how fast-moving it is. Makes sense that Ada is pretty slow moving, given its purpose.
> too much feature churn
Pick one, please.
Getting more eyeballs on a language change and getting language users involved in its development leads to more strength than simply spending more time on each change.
From what I can tell the vast majority of changes to Rust are small things like "Adding a method to Vec". These aren't really the type of things that turn into cruft/ radically change the language, but we also don't have to wait years for them.
The speed of change before it stabilizes has a strong inverse correlation with the number of features that don't fit well, and after it stabilizes I don't see much of a correlation overall.