Linked by Owen Anderson on Mon 19th Apr 2004 05:43 UTC
General Development For years the development scene has been dominated by the C family of languages, primarily C itself and its immediate successor C++. Recent years have given rise to other C-descendents, however, such as Sun's Java and Microsoft's C#.
Permalink for comment
To read all comments associated with this story, please click here.
RE: Null Pointers
by Marcus Sundman on Thu 22nd Apr 2004 04:36 UTC

> > An empty string is NOT nothing, it is something, namely
> > a string, just as the string "a" is a string. This is
> > not something that can be negotiated
> It COULD be nothing and CAN be negotiated.

Uh? No, a car is a car, a string is a string, an apple is an apple and null is null. A car is not null, an apple is not a string and a string is not null. What part of this is too hard for you to understand?
As I said, you might want to _TREAT_ a particular car as equivalent to the number 42 or a particular string as equivalent to null. This is clearly incorrect, but one might still want to do it in certain situations.

> You're just being pig-headed and opinionated.

Yeah, right. And I suppose you also think that you aren't. If there is something I'm guilty of then it's that I'm feeding a troll like you.

> Try thinking outside the box for a change.

How about you trying to think on a slightly higher level than registers and memory addresses? Do you think you could do that? D is not a macro assembler, you know.

> > Will you stop talking about irrelevant implementation
> > details when I'm trying to discuss the language! Or is
> > the point you're trying to get across that you know
> > that it's wrong that ""==null, but that it is faster
> > and therefore justified?
> It's not irrelevant. Any language worth using must
> consider the implementation at some level or it will
> fall behind ones that do.

Of course the implementation is relevant, but your comments about the implementation have been irrelevant regarding the point I've been trying to make. I've only been talking from a programmer's point of view, but your comments have been from a language implementer's point of view (or something), and you've refused to listen to what I'm saying. As a programmer I don't care how my languages are implemented, at least not as much as I care that they are easy and logical to use.
Also, you didn't answer my question.

> I was pointing out the fact that it can make nearly any
> implementation of the langauge better.

That is not a fact and you know it, so just stop lying.

Sigh! Let me try once more to get even you to understand. If "argh"==42 then all programs that need to make a distinction between "argh" and 42 must implement ugly workarounds to get around what I would call bad design in the language. Do you agree? Now, how is the ""==null situation any different from the "argh"==42 situation?

> If they want to make ""=null, that's their right.

Of course, and it's my right to not like it.

> You're arguing that because C defines a string one way
> that no other definition in any other language is
> acceptable.

What?!? Are you saying that "C" (whatever you mean by that) defines a string at all, and that I like, and even require, that definition? You are just unbelievable...
Try to snap out of your self-inflicted delusions for a moment now. I'm definitely not arguing that D should make a distinction between null and "" because of how any other language is or isn't designed. Least of all would I want another C, which is a language that I simply hate, not least because of its lack of a decent string type. Please reread my previous postings.

> You're wrong. It's that simple.

Not only have you not given any reason for why a programmer would want ""==null more often than not, but you also haven't even tried to address my objections to it.