@safe inference fundamentally broken

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 5 11:47:54 PDT 2014


On Thursday, 5 June 2014 at 18:33:22 UTC, Timon Gehr wrote:
> On 06/05/2014 08:17 PM, deadalnix wrote:
>> @safe is fundamentally broken.
>
> What's the "fundamental" problem? The construct seems perfectly 
> fit to specify memory safety in at least the following context:
>
> void main()@safe{}
>
> :o)

Many constructs are assumed to be @safe on basis @safe don't
guarantee.

T[] arr = [ ... ];
arr = arr[$ .. $];
auto garbage = *(arr.ptr);

@safe is as safe a a condom with holes poked in it.


More information about the Digitalmars-d mailing list