News for hackers. Stuff that matters.
Re:Ask HN: Why do you use Rust, when D is available? by secondcoming on Friday June 12, 2020 @12:34PM (#23500916)
C++ is being blamed for allowing people to write buggy, insecure programs. In my mind, that's different to just becoming unpopular; it's dying because it's too dangerous and too complicated.

Sure, it'll stick around for some years yet but all those jobs will become maintenance jobs. Very little greenfield projects will elect to use it outside of niche areas (games and maybe embedded - UK salaries for embedded dev are terrible). Both C++ and Rust can use LLVM, so the generated code is likely to be the same.

If you were starting a greenfield project today why would you choose to do it in C++?

I forgot to mention Go too.

Re:Ask HN: Why do you use Rust, when D is available? by ncmncm on Friday June 12, 2020 @02:55PM (#23502438)
In fact, essentially all new development in the highest-paid financial, HPC, CAE, telecomm, aerospace, and ML fields is pure C++. Rust is not a blip in any of them, and will not be for years to come. C is dead there (except in aerospace and telecomm), Go is nonexistent, and Java is mentioned on rare occasions.

To suggest C++ usage is in decline is, objectively, nothing short of delusional. For Rust, C++ will the one to beat in ten and twenty years, provided not too many have already skipped onto some new hotness.

Rust is an objectively better design than anything else that has arisen in 30+ years. That doesn't guarantee success.

I used to hope a better language would displace C++, and for a time thought Rust might be it, but that better language turned out to be C++ itself. Nothing else is even on the horizon.

Re:Ask HN: Why do you use Rust, when D is available? by krapht on Friday June 12, 2020 @02:37PM (#23502263)
My company starts new programs in C++ because everyone knows C++ already, we write modern C++, our libraries are written in C++, and our bugs are mostly not memory safety issues.
Re:Ask HN: Why do you use Rust, when D is available? by bigjake on Sunday June 21, 2020 @09:12PM (#23596635)
I would choose C++ because the tooling is superb, talent is widely available, it is performant, there are libraries for pretty much everything, and it's a great language.

Oh and by the way, LLVM is 100% c++.

Saying it is too dangerous and complicated is absurd. It is easy to write safe code in C++, having been doing it for almost 30 years.

You are throwing around lots of assertions - challenge you to back them up with real data.

Re:Ask HN: Why do you use Rust, when D is available? by mbrodersen on Sunday June 14, 2020 @12:16AM (#23515077)
The world runs on C/C++ code. And new C++ projects are started every single day.