@safe status

Michel Fortin michel.fortin at michelf.com
Fri Feb 5 13:39:06 PST 2010


On 2010-02-05 15:22:44 -0500, Walter Bright <newshound1 at digitalmars.com> said:

> Michel Fortin wrote:
>> My only wish in relation to that is that SafeD be more usable.
> 
> I know safe D isn't fully implemented, but can you say which missing 
> part of it you need?

First, I'd like to say that language itself isn't too bad. I think 
SafeD as currently implemented has the right design, except when it 
comes to passing delegates and functions as arguments to templates or 
functions. But I abandoned using this so it's not a pressing need for 
me currently. Still, I think that's an important issue to solve 
otherwise it'll be difficult to make std.algorithm safe and at the same 
time usable from unsafe code (as it relies heavily on predicates).

So basically in the implementation there's just one big annoyance for 
me right now (but the workaround is easy):
http://d.puremagic.com/issues/show_bug.cgi?id=3636

Most of the problems come from Phobos not being safe. I'm using a 
couple of things scattered in std.range, std.string, std.file, 
std.stdio, std.path, and to!X in std.conv.

So what's the plan? Should everything theoretically safe in Phobos be 
@trusted to avoid complains about unnecessary checks in programs that 
don't bother about safety? Or should we make things @safe and promote 
them to @trusted (for performance) only after a careful review? I'm a 
proponent of not making anything @trusted in Phobos until it has been 
reviewed and approved by someone else than the author.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list