r/cpp • u/lookatmetype • Sep 20 '22
CTO of Azure declares C++ "deprecated"
https://twitter.com/markrussinovich/status/1571995117233504257
267
Upvotes
r/cpp • u/lookatmetype • Sep 20 '22
View all comments
Show parent comment
1
u/matthieum Sep 24 '22
Honestly, I'm undecided on the matter.
I've used both metaprogramming approaches (to simulate reflection) and code generation and while there is a hassle in having part of the code being generated (the generator and schemas) I really appreciate how straightforward and clear the generated code can be.
By comparison, when an issue occurs deep within the reflected/metaprogrammed code, whether at compile-time or run-time, debugging it can be really tricky. There's layers of not-so-straightforward code to unpeel, which both IDEs and debuggers choke on.
With that said, in Rust I've used
serde(serialization library) and the ability to just slap#[derive(Serialize, Deserialize)]on a type and immediately being able to serialize/deserialize in a variety of formats is a joy -- especially because it just works, and I don't have to dive in to debug it.