[Info-vax] Memory Safe Programming Languages
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Thu Mar 7 13:41:56 EST 2024
On 2024-03-06, bill <bill.gunshannon at gmail.com> wrote:
>
> And 40 years ago we had safe C. We all know how well that
> survived. If people weren't willing to choose memory safety
> back then, why would they be expected to now?
>
There's no such thing as a "safe" language.
What there is are "safer" languages in which it is a lot harder to
make accidental mistakes, and harder for accidental mistakes you do
make to remain undetected, especially if you use the full capabilities
of the language.
For one really simple example, don't just try to write C code using
Ada syntax, and place everything in plain Integers, but use the full
data type modelling capabilities of the language.
Also, use ranged data types to constrain the allowed values (which was
something that Rust couldn't properly do the last time I checked;
attempts to implement this in Rust were part of some addon library,
not part of the core language).
The recommendation is to switch to using these "safer" languages, not
some mythical "safe" language.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list