331 karma · joined Feb 16, 2015 (11y ago) · 258 submissions
comment 7y ago · link · parent
No way. C++ was always much more into the functional programming paradigm. (See the STL, for example.)
The connection between C++ and OOP is because OOP was the insane hype at the time when C++ was being invented. The OOP lipservice was mandatory in order to be taken seriously by the fashion-driven programming industry, but real C++ programmers always looked down on OOP and considered it a code smell and crutch.
comment 7y ago · link · parent
Not in this case. Java failed because it sucked from a technical point of view. It traded better 'OO purity' in exchange for worse security, portability and performance.
The end result is that users got something that was slower and buggier for no gain.
comment 7y ago · link · parent
No such thing. A "reusable" rocket means you waste capacity carrying fuel for the return trip, and so raise the costs.
It's not like you can refuel the rocket once you get where you're going.
This is the reason why nobody uses "reusable" rockets today, not tech. (The tech was available back in the '60s.)
comment 7y ago · link · parent
No, it is not.
> proper package manager, modules
That's an OS usability issue, not a language problem. Personally, Nix solved this for me.
> type constraints
C++ has type constraints, and ones that actually work. I suspect what you call 'type constraints' is something that can't exist if you understand the difference between 'run-time' and 'compile-time'.
> sane lookup rules for function calls
A very minor issue. If you don't like function overloads, then don't use them.
> thread safety, a proper monastic future type
Please no. The kind of 'thread safety' you want destroys the benefit of using threads in the first place. C++ threading is perfect as it is.
> Also most people won’t see C++ 17 or 14 for another decade.
Frankly, I don't care about these twisted people stuck in enterprise hell.
comment 7y ago · link · parent
And you never should. That indeed is horrible design.
What you do need is a separation between 'exceptions that cause hard failure' v.s. 'exceptions that can lead to soft restarts'.
You can easily separate them using common sense just looking at where your interface is located.
comment 7y ago · link · parent
comment 7y ago · link · parent
That's because you're inexperienced.
> All possible behaviors should be treated on equal footing, using the control structures of your language.
That's impossible if you're dealing with a system composed of multiple interacting abstraction layers.
An error inside a function precondition is not the same as an error crashing a thread of execution, which in turn is not the same as an error in logical consistency communicating between different services.
The "equal footing" you're talking about can only exist if you're dealing with very simple and linear programs.
comment 7y ago · link · parent
Yes, there's can be benefit to starting from scratch with a different language w.r.t. training new teams with good habits and skills from the start.
But going into Rust just because it's fashionable at the moment is a recipe for pain several years down the line.
If you want a working pain-free solution learn C++17 instead.