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