Oh, and my proposal does not make existing code fail to compile. See
Lombok's @SneakyThrows. It just gives a third method of handling an
exception: You can currently throw it onward (but you change the
signature when you do so), or you can catch it. Lombok / this proposal
adds a third option: Throw it onwards WITHOUT changing your signature.

The change to allow catching checked exceptions that the try body does
not appear to throw is obviously backwards compatible as well.

On Sep 24, 3:43 am, Josh Berry <tae...@gmail.com> wrote:
> On Thu, Sep 23, 2010 at 5:39 PM, Reinier Zwitserloot 
> <reini...@gmail.com>wrote:
>
> > How's that different? The only thing you just told me is that you want
> > to turn "forgot to do something with checked exception" from error to
> > warning, which is close to a no-op in my book - I can delve into the
> > eclipse compile settings and change a plethora of problems around from
> > error to warning to ignore.
>
> My point is that it is no different.  Just drop "checked" exceptions and you
> can move all of that into warning territory.  No need for new syntax on top
> of it.  Further, it doesn't screw up compatibility with existing code.  It
> may cause someone to start getting a warning when you change your mind about
> "sneakily throwing" something, but it will still compile.  (Which is
> decidedly not the case in your method, no?)
>
> in other words.  As soon as you "allow code to catch non-checked exceptions"
> you have essentially already done away with checked exceptions.

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

Reply via email to