What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 142 Stack Exchange communities.

Why do we have a ???

I would say kill it or am I missing some cool language called nothing?

share|improve this question
Seems like it's mostly improperly applied to mean null but I'm not sure, are there some languages that have a Nothing construct/datatype/ect? –  Ben Brocka Apr 1 '12 at 14:53
I retagged a few where it was really not needed/appropriate. –  Mat Apr 1 '12 at 14:56
We should add some tag info to let people know it's for the VB Nothing keyword. –  PeeHaa Apr 1 '12 at 14:57
That tag has the most appropriate tag wiki ever! –  Tim Post Apr 1 '12 at 14:59
It would be highly appropriate on a Seinfeld stack exchange. –  tvanfosson Apr 1 '12 at 15:08
@TimPost I improved the tag wiki. –  Rosinante Apr 1 '12 at 21:57
@Rosinante sigh. –  PeeHaa Apr 1 '12 at 22:09
@RepWhoringPeeHaa I'll clean it up tomorrow, I promise. –  Rosinante Apr 1 '12 at 22:22

1 Answer 1

up vote 14 down vote accepted

Having is better than having ! Or is it the other way around?

(Although really, I suspect it's because some languages like Visual Basic use Nothing when they mean null.)

share|improve this answer
msdn.microsoft.com/en-us/library/0x9tb07z.aspx. You're right... What a stupid keyword btw :) –  PeeHaa Apr 1 '12 at 14:54
Visual basic ruins EVERYTHING. Again. –  Ben Brocka Apr 1 '12 at 15:09
No, it's that every other language uses null when they mean Nothing. Frustrating. –  minitech Apr 1 '12 at 15:56
@minitechη "Nothing." is also the answer you could give to "Did you say anything?" You don't reply that question with "Null." –  kiamlaluno Apr 1 '12 at 16:58
@mini: Nothing in VB.NET is not directly equivalent to null in, say, C#. –  Cody Gray Apr 2 '12 at 7:04
@TheEstablishment: Where is it not? –  minitech Apr 2 '12 at 13:21
@mini: It has quite different semantics than null does in C#. It's probably accurate to characterize it as providing a superset of the functionality, in that you would use Nothing in VB.NET anywhere that you would use null in C#, but you can also use Nothing in a number of places in VB.NET that you couldn't use null in C#, and Nothing also represents the default value for value types. I'm sure there are questions on SO that discuss this. I feel like I've answered one myself, but I'm much too lazy to search... :-) –  Cody Gray Apr 2 '12 at 16:03
@TheEstablishment: Since when is Nothing the default value for value types? Um... –  minitech Apr 2 '12 at 18:27
@mini: It implicitly converts to any type in the type system, and it is equivalent to the default value of that type. It's always been that way, since way back in the bad old days of COM-based VB. The following statement is legal VB: Dim x As Integer = Nothing The value x will be equal to 0. Contrast that with int x = null; which is not legal C#. This is only a simple example. –  Cody Gray Apr 2 '12 at 22:55
@TheEstablishment: Wow. I've always used 0 and *.Empty. Thanks! –  minitech Apr 2 '12 at 23:02
@mini: Didn't say I recommended it... –  Cody Gray Apr 2 '12 at 23:02
@TheEstablishment: I know, I hate it when people assign Nothing to something because it's pointless. But it's good to know. So thanks! –  minitech Apr 2 '12 at 23:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .