this post was submitted on 06 Oct 2026
387 points (98.5% liked)

Greentext

8803 readers
569 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] red_tomato@lemmy.world 100 points 17 hours ago (1 children)

The whole point of C++ is to graft Object Oriented Programming into C like some Frankenstein’s monster because OOP was the big hype.

C++ being performant is mostly a side effect of it being based on a language created when programs were still punched into paper cards.

[–] Eggymatrix@sh.itjust.works 25 points 16 hours ago (3 children)

That was the point 20 years ago. These days it is pivoting to compile time functional programming

[–] Hadriscus@jlai.lu 16 points 16 hours ago (3 children)
[–] e8d79@discuss.tchncs.de 20 points 14 hours ago (2 children)

If you have a constant expression like 1 + 2 in your code you can evaluate it at compile time once and avoid computing it at runtime. You can do that with control flow and much more complex language constructs in C++. If you want to know more about that look into C++ template meta programming, constexpr, and constval.

[–] timochka@lemmy.zip 7 points 12 hours ago

Translation: "We've made the preprocessor a first-class language feature!"

(jk, don't kill me)

[–] Hadriscus@jlai.lu 2 points 13 hours ago
[–] ddplf@szmer.info 9 points 14 hours ago (1 children)

it means rust is cool as fuck

[–] Hadriscus@jlai.lu 2 points 14 hours ago (2 children)

aren't they talking about C++ ?

[–] ddplf@szmer.info 9 points 13 hours ago (1 children)

C++ has pretty much no compile-time checks, while Rust's overengineered syntax allows it's compiler to catch vast majority of your everyday errors during compilation.

[–] Hadriscus@jlai.lu 3 points 13 hours ago
[–] asdfasdfasdf@lemmy.world 3 points 11 hours ago* (last edited 11 hours ago)

Rust is a very modern alternative to C /C++.

[–] red_tomato@lemmy.world 7 points 15 hours ago

Overengineered mess

[–] iknewitwhenisawit@fedinsfw.app 6 points 13 hours ago

C++ has a lot of terrible language features because it would allow some 8 bit embedded CPU to dynamically change from LSB to MSB ordering in the middle of decoding some input. 🙈

[–] protogen420@lemmy.blahaj.zone 2 points 13 hours ago (1 children)

does anyone actually follow whatver the comittee sees as best practices?

[–] e8d79@discuss.tchncs.de 3 points 12 hours ago

I think the closest to an actual answer you will find are the cpp core guidelines.