safety model in D

Leandro Lucarella llucax at gmail.com
Tue Nov 3 15:36:45 PST 2009


Andrei Alexandrescu, el  3 de noviembre a las 16:33 me escribiste:
> SafeD is, unfortunately, not finished at the moment. I want to leave
> in place a stub that won't lock our options. Here's what we
> currently have:
> 
> module(system) calvin;
> 
> This means calvin can do unsafe things.
> 
> module(safe) susie;
> 
> This means susie commits to extra checks and therefore only a subset of D.
> 
> module hobbes;
> 
> This means hobbes abides to whatever the default safety setting is.
> 
> The default safety setting is up to the compiler. In dmd by default
> it is "system", and can be overridden with "-safe".

What's the rationale for letting the compiler decide? I can't see nothing
but trouble about this. A module will tipically be writen to be safe or
system, I think the default should be defined (I'm not sure what the
default should be though).

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
Did you know the originally a Danish guy invented the burglar-alarm
unfortunately, it got stolen



More information about the Digitalmars-d mailing list