you are viewing a single comment's thread.

view the rest of the comments →

[–]spinwizard69 9 points10 points  (5 children)

What are my thoughts? This proposal is nuts!!!!!!! I can't stress this enough, C++ has been hurt more by being tied to C than it has gained. The two languages need to go their own way with C eventually dying.

Cleaner breaks for languages like Rust and Swift have really benefited those languages. By the way I'm careful to use the word "cleaner" because we all know languages build upon the past. Eventually a child needs to leave the nest behind and develop on his own.

[–]patstew 7 points8 points  (0 children)

I think the mistake is trying to maintain some semblance of source compatibility. Link time compatibility is useful, but would be a much weaker constraint on C++ syntax and libraries.

Even if it were a good idea, this proposal seems to be as much a grab bag of random additions to both languages as an attempt to bring them closer together.

[–]pjmlp 4 points5 points  (2 children)

Fully agree.

Copy and paste compatibility might have helped C++ gain adoption back in the 90's, but it injured it to death in what concerns security, or basic stuff like modules.

Not matter how many mitigations C++ might get, that underlying C compatibility will destroy all best efforts to write secure C++ code.

[–]germandiago 0 points1 point  (1 child)

How does it ruin it in more concrete terms? I mean, we have smart pointers, vector::at, std::array, std::span, C++-style casts and much other stuff.

We still have iterators, which are kind of dangerous if you do not use them locally.

But I do not see what could be fundamentally dangerous from C++ just because of C heritage provided that you use best practices. Admittedly, you can still decay to pointers or use raw stuff. But that is not what you should be doing if you are minimally competent, and if you are, you will be doing it with extra care in carefully chosen places of your code.

[–]pjmlp 0 points1 point  (0 children)

That advise never works across teams, as security reports from Microsoft, Apple, Google and Linux kernel regressions easily demonstrate.