2008/10/23 Niclas Hedhman <[EMAIL PROTECTED]>

> Gang,
>
> I just saw a claim regarding the "Fan" language, saying
>
> <quote>
> Well, it turns out that is the most common state for variable. Most
> programmers intend most variables to not hold null. In converting the
> Fan sourcebase figures of 80% were not uncommon (ie. 80% of variables
> were originally intended to never hold null). Clearly it makes sense
> to make the most common case the default, and thus to make handling
> null a special case.
> </quote>
>
> Although they (nor I) can substantiate the claim in more detail, my
> gut feeling says that it is probably true.
>
> Would that mean we should have default constraint @NotNull, and
> instead allow people to mark @Null when it can be??
>

makes sense to me - FWIW by default Guice considers injection of null
to be an error, but you can allow this by marking the field as @Nullable

(you can actually use any annotation type, as long as its simple name is
 Nullable - this means you can "re-use" IntelliJ and JSR305 annotations)


> Cheers
> Niclas
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>



-- 
Cheers, Stuart
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to