Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> No, it's one of the worst languages I ever used.

That says more about you than the languages you've used.

C++ is one of the top 5 languages used in production. This is true still today, with so many specialized languages to pick and choose. No one had to hold a gun to anyone's head to get them to adopt it. How do you rationalize that if your opinion had any substance or merit?

For the sake of argument, I assert exactly the opposite: C++ post-C++11 is the absolute best language ever devised by mankind, bar none. Am I wrong?

> Tons of footguns and bad design choices everywhere.

Please go ahead and point out the single most egregious "foot gun" or bad design choice you can possibly imagine. The worst. This will serve to show the world how well thought through your opinion actually is.



I don't think C++ is one of the worst languages; there are very few languages as powerful as C++, that alone makes it one of the best.

But, much like love and hate, I also don't think that the opposite of good is always necessarily bad, nor vice-versa. A language can be both good and bad at the same time, in different aspects.

C++ is really good (unrestrained freedom, performance, ecosystem), and also really bad (tooling, templates, really hard to debug memory issues).

Rust is somewhat less good (less free, slower, puny ecosystem in comparison), but also a lot less bad (powerful type system, thread safety, fearless iterators/lambdas, etc).

Many of the warts C++ has to carry due to its commitment to compatibility, are fixed in Rust with much better alternatives. A lot of footguns are well encapsulated in Rust's affine-ish types and algebraic data types, while still providing unsafe hatches for when you need them. Defaults really matter.


> No one had to hold a gun to anyone's head to get them to adopt it. How do you rationalize that if your opinion had any substance or merit?

We did. It was either C or C++ that were supported by our hardware vendor.

> For the sake of argument, I assert exactly the opposite: C++ post-C++11 is the absolute best language ever devised by mankind, bar none. Am I wrong?

Absolutely. It is one of the most complex and error prone languages out there.


Lambdas that can borrow from the stack and still return. Absolutely unacceptable feature without a borrow checker.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: