|
|
|
|
|
by WCSTombs
266 days ago
|
|
The article isn't claiming there is a "one true modern subset" of C++ that they use. It's merely pointing out that you can significantly mitigate the main criticisms of C++ by making certain sacrifices, which is pretty much true. There are good reasons the standards committee doesn't make those sacrifices on your behalf, because ultimately there are tradeoffs there that the programmer is supposed to understand and have control over. However, there is an argument to be had about what the default "safety setting" should be and whether C++ makes a good choice. IMO that's actually the main difference between safety in Rust and C++, since you can make Rust just as unsafe as C++ if you want, only you need to explicitly mark your code as unsafe. Also, I believe the C++ standards committee does care about this, which is why Profiles [1] are being considered. [1] https://github.com/BjarneStroustrup/profiles |
|
They’re arguing that they’ve found a sufficiently safe subset, which if true would be the first.
It would be a waste of time to relitigate the many programmer-hostile, unsafe decisions the committee has made over the years. I think your programmers who are supposed to “understand and have control over” C++’s arsenal of footguns are more or less fictional and a language designer shouldn’t take them as intended audience.
https://robert.ocallahan.org/2017/07/confession-of-cc-progra... (2017)
> Also, I believe the C++ standards committee does care about this, which is why Profiles [1] are being considered.
It was discussed at length why this proposal is insufficient: https://news.ycombinator.com/item?id=45234460