logoalt Hacker News

reactordevyesterday at 12:47 PM2 repliesview on HN

My pet peeve with c++ is exactly this. Either it’s not wise to call release, or it is (under circumstances) and yet the developer has no idea whether their scenario applies (tip: it doesn’t, 90% of the time).

The stdlib is so bloated with these “Looks good, but wait” logic bombs.

I wish someone would just draw a line in the sand and say “No, from here on out, this is how this works and there are no other scenarios in which there needs a work around”. This is why other systems languages are taking off (besides the expressiveness or memory safety bandwagon) is because there are clear instructions in the docs on what this does with examples of how to use it properly.

Most c++ codebases I’ve seen the last 10 years are decent (a few are superb) and I get that there’s old code out there but at what point do we let old dogs die?


Replies

GuB-42yesterday at 2:29 PM

C++ has always been a "kitchen sink" language, it is used in many different ways and drawing any line may alienate an entire industry.

> This is why other systems languages are taking off

Great! It is not a competition. If you think that Rust is a better choice, use Rust, don't make C++ into Rust. Or maybe try Carbon, it looks like it is the language you want. But if you have some old dogs you want to keep alive, then use C++, that's what it is for.

show 1 reply
pjmlpyesterday at 2:36 PM

> This is why other systems languages are taking off

For the time being that are still being written with C++ infrastructure though.

It would be great if those wannabe C++ replacements were fully bootstraped.

show 2 replies