safety model in D
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Nov 4 06:16:08 PST 2009
Michal Minich wrote:
> Hello Michel,
>
>> module (system) name; // interface: unsafe impl.: unsafe
>> module (safe) name; // interface: safe impl.: safe
>
> I thought that first (unsafe-unsafe) case is currently available just by:
>
> module name; // interface: unsafe impl.: unsafe
>
> separating modules to unsafe-unsafe and safe-safe has no usefulness -
> as those modules could not interact, specifically you need modules that
> are implemented by unsafe means, but provides only safe interface, so I
> see it as:
>
> module name; // interface: unsafe impl.: unsafe
> module (system) name; // interface: safe impl.: unsafe
> module (safe) name; // interface: safe impl.: safe
>
> so you can call system modules (io, network...) from safe code.
That's a pretty clean design. How would it interact with a -safe
command-line flag?
Andrei
More information about the Digitalmars-d
mailing list