D - Unsafe and doomed

Timon Gehr timon.gehr at gmx.ch
Sat Jan 4 05:49:40 PST 2014


On 01/04/2014 06:16 AM, Walter Bright wrote:
> On 1/3/2014 8:36 PM, Timon Gehr wrote:
>> On 01/04/2014 05:31 AM, Walter Bright wrote:
>>> ...
>>>
>>> Null pointers are not a safety issue.
>>
>> In the general sense of the word, yes they are.
>
> Please explain.
>

Safety is some kind of guarantee that something bad never happens.

Eg. memory safety guarantees that memory never gets corrupted and null 
safety guarantees that null pointers never get dereferenced. Any 
property that can be stated in this way is a safety property.

Hence it is fine to claim that the lack of dereferenceable null pointers 
makes a language safer, even though it has no bearing on memory safety.


More information about the Digitalmars-d mailing list