Originally posted by jacob
View Post
The culprit here is that C++ aimst to stay compatible. If you would want to write leakfree code, then you would define rules for passing owning pointers,
and might forbid passing references / raw pointers in favor of using smarter classes.
Originally posted by jacob
View Post
On safety critical software you wont use global heaps but small tables of pre-allocated memory, C++ further allows you write classes and even containers (of fixed max capacity) that live perfectly on the stack. You only use global storage if absolutely necessary, at the latest point (after all checks) as that eases up cleanup and verification alot.
Originally posted by jacob
View Post
Its still the only valid tool for anything safety, paired with strict guidelines. If rust will ever be included in that list, you can be sure it wont be the "rust standard" but a restricted subset defined by a guideline.
Comment