D - Unsafe and doomed
Kelet
kelethunter at gmail.com
Fri Jan 3 20:25:59 PST 2014
On Saturday, 4 January 2014 at 04:20:30 UTC, David Nadlinger
wrote:
> On Saturday, 4 January 2014 at 02:27:24 UTC, Kelet wrote:
>> While `@safe` helps reduce this class of logic errors […]
>> you can still have […] dangling pointers, hence it is
>> usually considered inferior with regards to safety.
>
> This is not true. While it _is_ possible to get null pointers
> in @safe code, they are not a safety problem, as the first page
> is never mapped in any D processes (yes, I'm aware of the
> subtle issues w.r.t. object size here, c.f. Bugzilla). And if
> you find a way to obtain a dangling pointer in @safe code,
> please report it to the bug tracker, this is not supposed to
> happen.
>
>> There was a SafeD[1] subset of D being worked on, but I'm not
>> sure if it is active anymore.
>
> SafeD is D in @safe mode.
>
> Cheers,
> David
Thanks for the corrections.
Ultimately, it sounds like Rust primarily takes the 'default on'
approach for things like safety and immutability, whereas D takes
the 'default off' approach.
Regards,
Kelet
More information about the Digitalmars-d
mailing list