Thomas G. Marshall said:
You just repeated what I said.
Don't think so, but maybe I should clarify my point:
I wanted to stress that the ability of being able to deduce a type when seen
just an expression, is regarded A Good Thing by most programming language
designers (for those languages at least, where the compiler is intended to do
type checking). This has nothing to do with the rules of what to do with such
an expression (for instance under what condition assignment is allowed).
In this respect, *every* expression in Java has a well defined type, and if you
would make null typeless, then you would have one exception from the rule,
which means a slight loss of orthogonality.
Of course one might ask wheather having defined typing for every expression,
is A Good Thing only for the implementor of the language, or for the user
as well. But this is not really a problem: Issues such as "the type of null"
probably don't pop up in introductory texts on Java, and I guess that many
Java programmers see such questions more as having philosophical quality.
Of course they have to go to the language definition, as this is the
reference for the language implementor. When we discuss such interestic,
but somewhat esoteric topics, we are doing it with the implementor's hat
on our head.
Ronald