[Checkers] @Raw in the nullness type qualifier hierarchy
mernst at cs.washington.edu
Mon May 25 01:58:04 EDT 2009
> 3. Raw: the type could represent a not-null reference whose fields are
> not fully initalized. This is usually the case during the execution
> of a constructor.
I see that this is a consistent interpretation, but it is not documented
anywhere. It is surprising to me and might be to other users as well. I
think it is easier to think about two distinct, simple, and orthogonal
concepts -- nullness and rawness -- than to have only 3 of the 4 logical
combinations, where raw implicitly implies non-null.
My main concern is with conceptual simplicity. So far, the concrete
difficulty I encountered was with my surprise/confusion, not with
expressiveness. "this" is never nullable, so a nullable raw reference
would not appear in a constructor, but raw references can propagate to
elsewhere that might admit null references.
I see that combining into a single type hierarchy is an implementation
convenience, but the interface to users should be more important (however
we decide it).
More information about the checkers