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