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

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.” - Bjarne Stroustrup

Not disagreeing that C++ is awful in a lot of ways and super difficult though. But I still weirdly like it, personally. I find it a fun challenge/puzzle to work with.



I truly loathe that quote. It is a tautology that is used to deflect legitimate criticism.


Yup. What's next? Lennart Poettering going "There are two kinds of init systems..."?


And it is not true (for any reasonable reading of the quote). There are very popular languages that don't get the deserved hate that C++ does. Sure, Python is slow, packaging/versioning is painful, but it is nothing like C++ complaints.

I mean, a standard (and stupid IMO) interview question is rate your C++ expertise from 1-10, and if you answer more than about 5-6 you get bounced for lying or not recognizing your limitations, while they gleefully point out Stroustrup wouldn't answer 9-10.


I mean. Python:

Bolted on, very terrible OO that should never be touched

Some of the most batshit insane ideas of encapsulation anyone has ever seen

Some of the most batshit insane return rules anyone has ever seen

Encouraged inconsistency from the language in the form of functions like “Len” that are added because sometimes someone feels it reads better?

Encouraged unwinding exceptions as regular flow control (lol. Yikes)

It is nearly universally agreed that Python has significant code management issues as code bases scale

This is all ignoring debates of fundamental typing issues. Personally, I hate what Python does, but some people seem to prefer it.

Let us not pretend Python doesn’t have some language problems on top of its tooling problems.


> It is nearly universally agreed that Python has significant code management issues as code bases scale

That's the worst part. But you have to agree it's the best for throwing small sized glue code around.


You forgot "it is so slow you might be faster with pen and paper".


It absolutely is true! You can certainly argue that different languages get different levels of complaints and hate, but every language that anyone uses gets a non-zero amount of complaints, regardless of severity.

> Sure, Python is slow, packaging/versioning is painful

Those are complaints. That is evidence that people complain about Python. You just did it yourself.

But maybe your complaints about C++ are an order of magnitude more plentiful than for Python. And maybe quite a few of your C++ complaints are about much worse things. But that's not the point: they are all complaints.

And that's the problem with the Stroustrup quote: he's implicitly saying that all complaints are created equal, and there's no difference between having 10 complaints or 10,000 complaints (where 3 of the first are major, and 5,000 of the second are major).

It's used, as the GP points out, to shut down legitimate complaints. "Oh, you don't like $REALLY_BIG_HORRIBLE_ISSUE with my language? Psh, whatever, people complain about all languages, I dare you to find another language that you won't find something to complain about." Not the point! Is $REALLY_BIG_HORRIBLE_ISSUE a problem or not? If not, actually explain and justify, with specific arguments, why you don't think it's a problem. And if you do agree it's a problem, stop deflecting attention, admit that's it's a problem, and try to find a solution!


I think we can say Rust is beyond the “nobody uses” stage by now, and it’s much simpler and easier than C++. (And people who use it tend to like it, proving Bjarne wrong).


I'm sorry; you think people don't complain about Rust? There are tons of articles posted here from people complaining about Rust in various ways. Bjarne wasn't saying whether most people like it... that's orthogonal: I actually like C++, yet I have been complaining about it--at times quite bitterly--since before it was even standardized!


Indeed, I am a huge proponent of Rust and have been using it since before 1.0 (even contributed to it, in the past) -- and I complain about Rust a lot, too. Trying to restate Bjarne's point here: if I wasn't using Rust, then I wouldn't have any reason to complain about it.


Or, because there’s so many languages around now, they just use something else. I really don’t like working with Rust myself and so I use other languages.


Rust is neither simple nor easy. Full stop.


Where did I say it was?


Well you did say: it’s much simpler and easier than C++

And if the basis of c++ is c with classes, you’re horribly incorrect. C is a small language, easy to understand and hard to master.

Rust is fucking miserable to understand, and as such, hard to master.

Why are you being pedantic?


C++ isn't "C with classes" and hasn't been for years. Yes, Rust is bigger and more complicated than C, but much less so than C++.

> Why are you being pedantic?

I'm not. I'm making a real point: Rust is much simpler and easier than C++, so the spirit of Bjarne's quote, which is that for a language to become popular it necessarily has to have as many drawbacks as C++, is wrong.


"Rust is more complicated than C++" is a pretty hot take.


Saying people complain about something is not the same as saying nobody likes it…


I feel that if the language is a challenge to work with, it better give you your money’s worth. In 2024, there are plenty of other languages with better ROI, if you want a challenge.

In any case, I think the primary goal of any programming language is to get out of your way and let you tackle more interesting problems related to the problem domain that led you to start writing a program in the first place.


I find it annoying to have to solve a puzzle to make progress solving my intended puzzle (i.e. whatever I’m computing)


> a fun challenge/puzzle to work with

You're basically saying the language gets in the way of solving your problem :)




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

Search: