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 J.F. on Thu 22nd Apr 2004 18:49 UTC

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?

You can't seem to understand that the definition of objects in a language is just CONVENTION. There is NO REASON they cannot be redefined to something else. Or are you too ignorant to understand that?

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.

YOU are obviously the troll here.

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.

Did you even READ the D specification and overview??? It says that part of its goal is to allow the programmer hardware level access and embedded assembly language. Now we are supposed to ignore the hardware and assembly language in a language DESIGNED to use them? You make less sense every post.

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.

Pot to kettle... hello... pot to kettle.

Also, you didn't answer my question.

I answered it three times, but you're too ignorant to understand the answer obviosuly.

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

Trolling again... sigh. Go back to your BASIC class and maybe you'll get a D.

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?

BIG SIGH!

Why should a language keep a bunch of pointers to bytes which are always 0? That's all a null string is - a pointer to a byte set to 0 (in C). Why not set null strings to the same byte to save space? It won't affect the programmer any. Why not set all null objects to the same pointer - a special code which means the object is empty... that would be even better and STILL not affect the programmer. Who CARES if ""=null as long as if (astr == "") works properly? Like you said, it's an implementation detail. So why the big fuss if someone wants to make it the same as null??

I like the idea that I could use if (!astr) to do the same thing as if (astr == "").

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.

I have given several reasons why a programmer would like it. You have yet to give a reason why not for me to refute other than state my definition is "illogical".