Call to Action: making Phobos @safe
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jun 25 15:44:37 PDT 2016
Andrei identified a key blocker for D adoption is the incomplete implementation
of @safe. I'm working on the compiler end. But Phobos has a lot of code that is
pointlessly not @safe, making it frustrating to write @safe code that calls
Phobos. Some are listed in Bugzilla, most are not.
So here's what to do:
1. Pick a module, any module, let's say 'std.foo'.
2. Compile it:
dmd -unittest -main std/foo
and run:
foo
to verify that the unittests work.
3. Take a look at foo.d and look for a unittest that is not marked @safe.
4. Add @safe to the unittest
5. Do Step 2 on it.
6. If it works, submit a PR with the annotation (well, try to collect a few of
these in one module)
7. If it doesn't work, find out where the unsafe code is and fix it, and submit
a PR.
I've submitted maybe a dozen PRs against Phobos over the last day from doing
this. It's only a start.
More information about the Digitalmars-d
mailing list