<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Denis wrote:
<blockquote
cite="mid:AANLkTinp2jeo3DLhv88S3sIoGwFOmR8RxJz8bYRrulnY@mail.gmail.com"
type="cite">
<pre wrap="">On Wed, May 26, 2010 at 11:09 PM, Walter Bright <a class="moz-txt-link-rfc2396E" href="mailto:walter@digitalmars.com"><walter@digitalmars.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Gee, I spent a whole 2 minutes looking at the problem.
</pre>
</blockquote>
<pre wrap=""><!---->
"Cure me doctor, I'm ill."
"Why bother? It's easier to take 2 pills every day to suppress the symptoms."
A problem which is easy to solve is still a problem.
</pre>
</blockquote>
<br>
It's true that if the language got rid of null pointers, there wouldn't
be null pointer exceptions. The problem is this doesn't solve the
problem, it just shifts it elsewhere. I normally use null pointers for
data that shouldn't be there, like for example, to mark the end of a
list. If I didn't have null pointers, I'd have to write a special "end
of list" object. What should that object do if accessed? Throw an
exception.<br>
<br>
And so I'm right in exactly the same place I was with the null pointer,
except that I had to write a bunch of extra code to get there.<br>
<br>
Null pointer exceptions are not bugs. They are bug <i>detectors</i>.
Defining null pointers out of a language is like putting black
electrical tape over the oil pressure light on your car. Voila! No more
pesky lights annoying you!<br>
<br>
</body>
</html>