Null References, the Billion Dollar Mistake 612
jonr writes "'I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. In recent years, a number of program analysers like PREfix and PREfast in Microsoft have been used to check references, and give warnings if there is a risk they may be non-null. More recent programming languages like Spec# have introduced declarations for non-null references. This is the solution, which I rejected in 1965.' This is an abstract from Tony Hoare Presentation on QCon. I'm raised on C-style programming languages, and have always used null pointers/references, but I am having trouble of grokking null-reference free language. Is there a good reading out there that explains this?"
Re:There was a bigger mistake: (Score:4, Funny)
I agree.ï½ï½ï½ï½ï½ï½ï½cï½ï½A
5ï½)ï½"ï½ï½ï½lï½3åï½ï½ï½SLï½4ï½54Vï½iï½ï½ï½D.O%N|ï½ï½ï½Tï½2nï½ì'iï½ï½ï½;ï½
ï½,ï½ï½(85ï½Iï½{ï½ï½ï½ï½)ï½Oï½Æ¼ï½%Cï½iwï½ï½ï½ï½ï½ï½I!,.ï½Õ'ï½ï½ï½ï½!ï½òfsQï½ï½zï½ï½Gï½ï½ï½aï½zï½-@ï½ yï½Ë+ï½ï½ï½Xï½ï½ï½ï½"ï½cï½âï½ï½ï½ï½ï½ï½ï½ï½ï½ï½dï½nbÕoeï½ï½ï½ï½lï½ï½ï½ï½ï½;hmï½ï½
An was an even Bigger mistake: (Score:5, Funny)
Zero. The bane of all. It was the gateway math to all modern problems. It would be so much simpler with just countables. Surely the current crisis, measured in trillions would look so much better without all those zeros.
Whoever it was who invented zero should take responsibility for all the worlds problems, ex nehilo.
Re:null or not null, that is the question (Score:2, Funny)
I've recently seen that one of our developers is using 0xfeedface 0xb00bf00d, which is nice and inventive.
Bad analogy. (Score:2, Funny)
Could you try a better analogy. I think we might all understand a car analogy better...
Re:There was a bigger mistake: (Score:5, Funny)
Just allocate the same amount of memory for everythi
Re:null or not null, that is the question (Score:5, Funny)
That being said, the author is not really responsible for billions of dollars of mistakes, the programmers are.
Who am I to argue with someone that is taking resposibility for my mistakes?
Re:20 second explanation (Score:3, Funny)
...this: 'if(hashmap.exists("myvalue")'
...is the "correct" check anyway...
Well, it'd be "correct" if it had the right number of parentheses, anyway! ;p
Re:null or not null, that is the question (Score:5, Funny)
Re:no such requirement at the assembly level (Score:0, Funny)
Yes, because Haskell doesn't operate on values or computer registers internally. It works entirely on pixie dust and unicorn tears.
Stop the crap please. It is okay if you like the language or it fills your belly, but don't feel the need to advertise it at any unlikely opportunity. You are not welcome.
You Haskellers are like furries or homosexuals, always needing to advertise your deviation to normal people.
You can write side-effects-less C code just as easily as you can in Haskell. That you can do something about side effects when it makes sense instead of just abstracting them away entirely is the defining power of C.
Two strings in a bar (Score:3, Funny)
The bartender says, So whatll it be?
The first string says, I think Ill have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy~~owmc63^Dz x.xvcu
Please excuse my friend, the second string says, He isnt null-terminated.