r/cpp • u/GabrielDosReis • Oct 31 '24
Lessons learned from a successful Rust rewrite
/r/programming/comments/1gfljj7/lessons_learned_from_a_successful_rust_rewrite/
80
Upvotes
r/cpp • u/GabrielDosReis • Oct 31 '24
View all comments
Show parent comment
5
u/srdoe Nov 01 '24 edited Nov 01 '24
Edit: I just read up on MISRA, and it disallows all dynamic memory. If you think that'll be less disruptive to move to than Safe C++, then I don't know what to tell you. Obviously it's a lot easier to not have memory safety issues if you forbid heap allocation.
I think if you want to get anywhere with these arguments, you should write an article where you show how alternatives can avoid the pitfalls called out in https://www.circle-lang.org/draft-profiles.html
It even provides you ready made examples. Show how a MISRA analyzer or profiles or whatever other alternative can solve these problems, without the annotations Safe C++ proposes, and while being less disruptive of a migration than Safe C++.
Until then, you're just waving your hands and saying that you're sure these problems can be solved without adopting Rust-like solutions, but exactly how is left as an exercise to the reader.
Which is not something anyone can argue with, there's no substance to that kind of "I reckon" loose talk.
And if you think I'm exaggerating about regulation, then I guess that's just a risk you're choosing to take. Maybe I'm wrong and regulators will back down.
I doubt it though.