Sounds good to me. @Optional indeed sounds better then @Nullable. Tool support is good off course but unit tests should be there anyhow and catch eventual problems, isn't it. I would go for @Optional.
On Mon, Oct 27, 2008 at 12:31 PM, Rickard Öberg <[EMAIL PROTECTED]> wrote: > Niclas Hedhman wrote: >> 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?? > > Hm, interesting point. It does make a lot of sense, and compared to > injection it is also the default that it is not null. With injection you > mark it as "optional" instead of "null"/"nullable" though, which in a > sense is a bit more domain-oriented I think. > > So far, +1! > > /Rickard > > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev > -- Alin Dreghiciu http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org - New Energy for Java - Domain Driven Development. http://malaysia.jayway.net - New Energy for Projects - Great People working on Great Projects at Great Places _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

