by pjmlp · 9y ago · 0 comments
Which is both a path to its successful adoption as better C replaced, but also a curse to language improvements.
So we need languages that share the same spirit as C++ in programmer tooling, but don't allow copy-paste of C code.
Also because Ada compilers were too expensive and most younger generations of developers never heard of it.
Hence Rust, which while a good progress towards safety still needs to match C++'s IDEs, debugging tools and being available on OS vendors SDKs as first level language.
I am looking forward to it, but it still isn't quite there.
It's fantastic flow controls allowed us to move beyond ASM and its convoluted jumps that can become difficult to reason about.
C++ gave us abstraction models that made reasoning about state easier in many ways, but spoils us by allowing us to try and abstract everything, and still possesses unexpected dangers.
Rust gives us abstraction over memory addresses, protecting us from ourselves, but still giving us some power, but sometimes getting in the way of the programmer.
There is a place for all of these.
I like that my RTC uses ASM, I like that my watch uses C, I like that my word processor uses C++, and I like that my web server uses Rust.
No one must be superior to the other. They aren't successors to each other. I think we find ourselves here: [0], and I think you and I may have to agree to disagree, because none of these languages is perfect, and they all impact each other.
Being almost the same age than C, and older than C++, means I know there were better ways of doing systems programming than any of them.
Right now C++ is the lesser of both evil, until Rust, Swift, .NET Native, D, other safe language of the month, eventually takes over most of its use cases.
And since the substitute elements are themselves pure C++, you can still use your existing IDEs, debugging tools and SDKs. And the migration of existing code can be done completely incrementally, and much of it won't need to be changed at all.
[1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus
The very few I happened to see weren't real ones, rather some meetings to tick a few check boxes, usually faded away after the managers realize the amount of "wasted money" doing them.
Or are you suggesting that it would be "politically" unrealistic to impose a prohibition on unsafe C++ code in the enterprise context? So it would be more realistic to adopt a new language, like Rust, that doesn't have the baggage that C++ does?
[1] https://blogs.msdn.microsoft.com/vcblog/2016/03/31/c-core-gu...
Money spent in code review processes and tooling is usually budgeted after unit testing and documentation, those tend to have quite small budgets and political willingness.
Yes to your last question, the good thing about languages that aren't copy-paste compatible with C, is that there isn't any easy way to write code the C way.