top | item 40881928

(no title)

marton78 | 1 year ago

After almost 20 years of experience with C++, there are still some gnarly details I wouldn't have imagined. What a God awful language!

Kudos to that author for the great, eye catching title and the in depth detail!

discuss

order

unwind|1 year ago

In case it's not known to everyone, the title is an obvious nod to "I Have No Mouth, and I Must Scream" [1], a 1960s US sci-fi story by Harlan Ellison.

1: https://en.wikipedia.org/wiki/I_Have_No_Mouth,_and_I_Must_Sc...

tannhaeuser|1 year ago

The question is which IHNMAIMS character the poster identifies with to have deserved his OOP misery, given all protagonists are imprisoned for life (or for eternity, actually, I believe) as a sentence for the bad things they did ;) Note there's also the adventure game created after the book, overseen and with a script also by Ellison.

shadowgovt|1 year ago

I assume AM is filled with so much hate because it's just three billion lines of C++.

_vaporwave_|1 year ago

That plot summary is... dark. Does anyone know how long the story is? Most of the copies I found online are collections of short stories.

tpoacher|1 year ago

pc adventure game was good too (i.e., messed up)

GuB-42|1 year ago

C++ is a popular multi-paradigm language that is both cutting edge and 40 years old (more if you count C), there is simply no way around that level of complexity.

You have "C with classes" that coexist with the "modern" way, full of smart pointers and functional programming. It is popular in embedded systems, video games, servers, and GUIs (mostly Qt). And if you look at the code, it is as if it was a different language, because the requirements are all very different. Embedded system need low level hardware access, video games are all about performance, servers want safety, and GUIs want flexibility.

There are less awful alternative to C++. For example C on one end of the spectrum and Rust on the other end. But none of them cover every C++ use case.

bee_rider|1 year ago

C++ needs a different name from multi-paradigm. Java is a multi-paradigm language. C++ is an omni-paradigm language. If there’s a paradigm,

- There’s at least an ugly library to do it in C++

- There might be support baked directly into the language

- Or you could do it in Lisp, but that would be too easy

marcosdumay|1 year ago

> multi-paradigm

Well, it does unstructured imperative, structured imperative, and OOP imperative!

Except if you count template programming, because that one is pure functional, but only runs at compile time.

aaroninsf|1 year ago

> But none of them cover every C++ use case.

Literal lol... this is not an argument in favor of C++.

slashdave|1 year ago

I would sort of agree, except when c++ was invented, it was even more awful in practice (does anyone remember the chaos around STL and template caches?). So, age isn't really a factor.

hu3|1 year ago

Zig looks promising too.

wredue|1 year ago

If you’re looking for a language with less complexity than C++, you’re surely not going to find that in rust.

ghosty141|1 year ago

I've been working with C++ at my job for 2.5 years now and I've already come to this conclusion. Wouldn't wanna use it if there is any other way.

The fact that you can do almost anything IS pretty cool, but without having at least one C++ wizard at hand it can drive you nuts.

philsnow|1 year ago

I don’t think I’ve ever gotten paid for a line of c++ but Google has a “style guide” for internal c++ code that omits something like 3/4 of the language, and people seemed pretty happy with it overall. Maybe not “happy” but “grudgingly accepting because it beats the Wild West alternative”.

ryandrake|1 year ago

Just another person’s opinion: I’ve been using C++ for my entire career, and to be honest, if I’m starting a new solo project, I reach for it unless there is some major technical reason not to. Yes, it can be messy. Yes, there are footguns. But as a developer, you have the power to keep it clean and not shoot the footguns, so I’m still ok with the language.

If I was starting a new work project with a lot of junior team members, or if I was doing a web project, or a very simple script, fine I’ll use a different language. There can definitely be good reasons not to use C++. But I’m at the point in my expertise that I will default to C++ otherwise. I’m most productive where I am most familiar.

FreezerburnV|1 year ago

“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.

diffxx|1 year ago

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

umanwizard|1 year ago

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).

catlifeonmars|1 year ago

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.

zarathustreal|1 year ago

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

nottorp|1 year ago

> a fun challenge/puzzle to work with

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

qsdf38100|1 year ago

So you hate C++. Great, thanks for your informative insights.

queuebert|1 year ago

I should print this and put it on my wall for all those times when I'm frustrated with Rust lifetimes.