On Sat, 06 Oct 2012 19:19:24 +0200, Reinier Zwitserloot <[email protected]> wrote:

It's also not 'laziness in the compiler' - Void is not void, end of story.
Trying to make the compiler sugarcoat a method that returns j.l.Void and
has no return statements implies all sorts of 'under the hood magic' that
javac is specifically designed NOT to do. There is an argument to be made
that this design principle (the 'don't sugarcoat stuff' principle) is wrong
or overzealously applied for javac, and that is an argument I might agree
with, but _THAT_ is why you have to be explicit with your 'return null'
here; laziness does not factor in to it.

And let's call it overzealous attitude rather than laziness, but in the end it's the sort of things that the compiler should handle - I just reckon that returning Void is something that you don't do every day.

--
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
http://tidalwave.it/fabrizio/blog - [email protected]

--
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to