safety model in D

Leandro Lucarella llucax at gmail.com
Wed Nov 4 08:37:50 PST 2009


Andrei Alexandrescu, el  3 de noviembre a las 17:54 me escribiste:
> Leandro Lucarella wrote:
> >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).
> 
> The parenthesis pretty much destroys your point :o).

I guess this is a joke, but I have to ask: why? I'm not sure about plenty
of stuff, that doesn't mean they are pointless.

> I don't think letting the implementation decide is a faulty model.
> If you know what you want, you say it. Otherwise it means you don't
> care.

I can't understand how you can't care. Maybe I'm misunderstanding the
proposal, since nobody else seems to see a problem here.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
CAMPAÑA POR LA PAZ: APLASTARON JUGUETES BÉLICOS
	-- Crónica TV



More information about the Digitalmars-d mailing list