D - Unsafe and doomed

deadalnix deadalnix at gmail.com
Sat Jan 4 09:09:12 PST 2014


On Saturday, 4 January 2014 at 13:49:40 UTC, Timon Gehr wrote:
> 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.

Amen


More information about the Digitalmars-d mailing list