Safety, undefined behavior, @safe, @trusted

Nick Sabalausky a at a.a
Thu Nov 5 12:49:42 PST 2009


"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:hcv5p9$2jh1$1 at digitalmars.com...
>
> Based on Andrei's and Cardelli's ideas, I propose that Safe D be defined 
> as the subset of D that guarantees no undefined behavior. Implementation 
> defined behavior (such as varying pointer sizes) is still allowed.
>
> Safety seems more and more to be a characteristic of a function, rather 
> than a module or command line switch. To that end, I propose two new 
> attributes:
>
> @safe
> @trusted
>

Sounds great! The lower-grained safeness makes a lot of sense, and I'm 
thrilled at the idea of safe D finally encompassing more than just memory 
safety - I'd been hoping to see that happen ever since I first heard that 
"safeD" only ment memory-safe. 





More information about the Digitalmars-d mailing list