Null references redux

Ary Borenszweig ary at esperanto.org.ar
Sat Sep 26 20:53:12 PDT 2009


Daniel Keep wrote:
> 
> Walter Bright wrote:
>> Daniel Keep wrote:
>>> "But the user will just assign to something useless to get around that!"
>>>
>>> You mean like how everyone wraps every call in try{...}catch(Exception
>>> e){} to shut the damn exceptions up?
>> They do just that in Java because of the checked-exceptions thing. I
>> have a reference to Bruce Eckel's essay on it somewhere in this thread.
>> The observation in the article was it wasn't just moron idiot
>> programmers doing this. It was the guru programmers doing it, all the
>> while knowing it was the wrong thing to do. The end result was the
>> feature actively created the very problems it was designed to prevent.
> A NPE is the thermonuclear option of error handling.  Your program blows
> up, tough luck, try again.  Debugging is forensics, just like picking
> through a mound of dead bodies and bits of fuselage; if it's come to
> that, there's a problem.
> 
> It's your leg dropping off from necrosis and the doctor going "gee, I
> guess you're sick."
> 
> It's the plane smashing into the ground and killing everyone inside, a
> specialised team spending a month analysing the wreckage and saying
> "well, this screw came loose but BUGGERED if we can work out why."
> 
> Then, after several more crashes, someone finally realises that it
> didn't come loose, it was never there to begin with.  "Oh!  THAT'S why
> they keep crashing!
> 
> "Gee, would've been nice if the plane wouldn't have taken off without it."

I like your analogies. :)



More information about the Digitalmars-d mailing list