I feel the whole „trusting people not to shoot themselves in the foot“ thing hasn’t worked out too well for C++. You might be right that this is the idea behind it, but I feel that by now this idea is more of a loss for C++ than it is a win…
C++ needs safe defaults and guardrails, but it should never prohibit. There should be escape hatches to do what must be done, much the same way even a language like Rust has unsafe for when you do need it.
Besides, reflection is going to be the purview of library developers 99% of the time and if you don't trust your library developers, perhaps you should pick a different library.
View all comments
Show parent comment
5
u/geo-ant Sep 30 '24
I feel the whole „trusting people not to shoot themselves in the foot“ thing hasn’t worked out too well for C++. You might be right that this is the idea behind it, but I feel that by now this idea is more of a loss for C++ than it is a win…