@live questions

Dibyendu Majumdar mobile at majumdar.org.uk
Sun Nov 22 11:14:00 UTC 2020


On Sunday, 22 November 2020 at 07:22:22 UTC, Walter Bright wrote:

>> b) Is it also the case that DIP1000 is only available if a 
>> function is marked @safe?
>
> It's an enhancement for @safe, yes.
>
>
>> It seems to me that both @live and @safe should be available 
>> as compiler flags to turn them on - and not have to rely on 
>> annotations. Is this possible?
> > Certainly in Laser-D I would like these to be ON by default
> and annotation
> > should be to suppress rather than enable.
>
> My DIP to make @safe the default failed.
>
> Turning @live on by default would be brutal :-)

I read DIP1028. However, my suggestion is somewhat different - it 
is to allow a compiler flag - say -fdefault-safe - such that any 
code that is not annotated explicitly gets a default of @safe. 
Thus anyone using this flag would not need to explicitly annotate 
with @safe. I also suggest not changing the meaning of anything 
other than just defaulting as above.

@live is more complicated I suppose as it can't deal with GC 
pointers?




More information about the Digitalmars-d mailing list