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. 🙈
Comment on Anon hates C++
Eggymatrix@sh.itjust.works 4 weeks agoThat was the point 20 years ago. These days it is pivoting to compile time functional programming
iknewitwhenisawit@fedinsfw.app 4 weeks ago
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.
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
87Six@lemmy.zip 4 weeks ago
Templates are cool as fuck tho… For like 5 minutes until you go insane
protogen420@lemmy.blahaj.zone 4 weeks ago
yeah, zig and rust have the same concepts but much better thought and structed
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++ ?
ddplf@szmer.info 4 weeks ago
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.
asdfasdfasdf@lemmy.world 4 weeks ago
Rust is a very modern replacement for C /C++.
red_tomato@lemmy.world 4 weeks ago
Overengineered mess