Comment on Anon hates C++
red_tomato@lemmy.world 1 month ago
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 1 month ago
That was the point 20 years ago. These days it is pivoting to compile time functional programming
Hadriscus@jlai.lu 1 month ago
What does that mean ?
e8d79@discuss.tchncs.de 1 month ago
If you have a constant expression like
1 + 2in 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.Amir@lemmy.ml 1 month ago
Or don’t look into those things if you wish to remain sane
timochka@lemmy.zip 1 month ago
Translation: “We’ve made the preprocessor a first-class language feature!”
(jk, don’t kill me)
Hadriscus@jlai.lu 1 month ago
thank you !
ddplf@szmer.info 1 month ago
it means rust is cool as fuck
Hadriscus@jlai.lu 1 month ago
aren’t they talking about C++ ?
red_tomato@lemmy.world 1 month ago
Overengineered mess
iknewitwhenisawit@fedinsfw.app 1 month 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 1 month ago
does anyone actually follow whatver the comittee sees as best practices?
e8d79@discuss.tchncs.de 1 month ago
I think the closest to an actual answer you will find are the cpp core guidelines.