null and type safety
Jarrett Billingsley
jarrett.billingsley at gmail.com
Tue Nov 4 13:35:39 PST 2008
On Tue, Nov 4, 2008 at 3:32 PM, Walter Bright
<newshound1 at digitalmars.com> wrote:
> Brendan Miller wrote:
>>
>> This is obviously a problem. Everyone knows that null pointer
>> exceptions in Java/C#, or segmentation faults in C and C++ are one of
>> the biggest sources of runtime errors.
>
> Yes, but those are neither type safe errors or memory safe errors. A null
> pointer is neither mistyped nor can it cause memory corruption.
Dereferencing a null pointer is *always* a bug, it doesn't matter how
"safe" it is. Don't you think that eliminating something that's
always a bug at compile time is a worthwhile investment?
More information about the Digitalmars-d
mailing list