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