Disallow null references in safe code?
Jonathan M Davis
jmdavisProg at gmx.com
Sun Feb 2 04:42:31 PST 2014
On Sunday, February 02, 2014 12:52:44 Timon Gehr wrote:
> On 02/02/2014 04:39 AM, Jonathan M Davis wrote:
> > I'm not sure how I feel about that, particularly since I haven't seen such
> > data myself. My natural reaction when people complain about null pointer
> > problems is that they're sloppy programmers (which isn't necessarily fair,
> > but that's my natural reaction).
>
> There is no such thing as 'naturality' that is magically able to justify
> personal attacks in a technical discussion, even if qualified.
Would you prefer that I had said "initial reaction" or "gut reaction?" I'm
just saying that that's how I tend to feel when I see complaints about null
pointers. I have never accused anyone of anything or otherwise attacked them
because they complained about null pointers. That _would_ be rude.
> The situation does not have to be unbearable in order to
> improve it!
True, but I don't even agree that null pointers are that big a deal in the
first place. If we really want to add non-nullable pointers or references to
the language, then we can. I don't think that that's necessarily a bad idea.
But I doubt that I'll use them often, and I do think that the whole issue is
frequently blown out of proportion.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list