[phobos] I applied @safe, @trusted, @system to Phobos!
Masahiro Nakagawa
repeatedly at gmail.com
Sat May 22 06:14:04 PDT 2010
Great work!
On Sat, 22 May 2010 20:36:50 +0900, SHOO <zan77137 at nifty.com> wrote:
> I succeeded in applying @safe, @trusted, @system to Phobos after
> hardship.
>
> I made a branch, please look:
>
> http://svn.dsource.org/projects/phobos/branches/devel/applying_safe_system_trusted
>
[snip]
> 4. dmd should not allow overload between @safe/@trusted and @system
> Document says "Functions are overloaded based on how well the
> arguments to a function can match up with the parameters."
> But @safe functions can overload between @system functions, though
> @safe is unrelated to parameters.
> It's enough to have only @safe function.
I agree this point.
This complicates the overloading rule if allows.
> 5. druntime's modules are not applying @safe/@system/@trusted
> This shows that Exception, TypeInfo, Thread and others are not
> usable by the @safe function virtually.
>
> 6. You must make the template function @trusted by all means
> When you use template, type that is maked @system may be handed to
> parameters.
> Therefore @trusted is required.
> This means that every template functions cannot take benefits from
> @safe.
>
> 7. Some mysterious compile errors
> When @safe unittest...
> Some functions are going to call opAssign. (eg: std.range(2670))
> Some functions are going to call __cpctor. (eg: std.stdio(165))
> Some functions are going to call ~this. (eg: std.stdio(872))
> (I try compile command: "dmd -I.. -c -o- -unittest -debug stdio.d")
>
> Please do not make it an useless treasure.
> I really wait for the day when this is used effectively.
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list