Hi Bob,
I've stayed out of this interesting thread because every time that I've
visited, one or more messages gets deleted when I click on it. This is the
first time that I've seen the thread intact!!
I agree with your distaste of the word Nothing when used with ValueTypes.
I'd even go as far as saying that it should be illegal to assign Nothing to a
ValueType. I would much prefer the use of the word Default - but they're
already using that for Default Properties, dammit!
Just one example:
Dim Somewhere As Point = Nothing 'Nothing means centre or origin.
The above doesn't put Somewhere outside the designated space - it puts it
smack in the middle at {0, 0}. That's hardly Nothing (or perhaps I should say
nowhere).
But while it sounds stupid to assign Nothing to a Boolean or a Point, I
agree with everyone else that for objects it makes perfect sense for Nothing
to mean 'no object'. The default type for an object variable <is> 'no
object' - how could it be anything else? This has to include Strings, too, for
they are reference types.
With the database values it seems unintuitive because while a Boolean can
only have True or False, a Boolean database column can be DbNull, True or
False. But that's because of the shortcuts in talking about it. A Boolean
database column isn't, and <cannot be>, a Boolean. It sounds as if I'm talking
in contradictions but 'Boolean database column' is just a convenient way of
saying 'a database column that, if it contains <anything>, will contain a
Boolean'. Hence DbNull for when it doesn't.
That's my two centimes.
Regards,
Fergus