Sujet : Re: value-flavoured structures
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.forthDate : 28. Sep 2024, 19:06:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87ldzbd54z.fsf@nightsong.com>
References : 1 2 3 4 5 6
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Paul Rubin <
no.email@nospam.invalid> writes:
Rust has unsafe modules but I don't remember Ada having them. Ada does
have an Unchecked_Conversion function but I don't know where this is
really needed or how well specified it is in the language standard.
Added: Ada also has "overlays" so you can make two objects share the
same machine address, ouch!
https://en.wikibooks.org/wiki/Ada_Programming/Type_System#OverlaysIt would surprise me if SPARK allows this feature, and it also might not
allow Unchecked_Conversion. SPARK is an Ada subset that is supposed to
be extremely safe, and it allows a lot of static verification. I've
been wanting to try it. It is designed for use in critical embedded
systems.