Yes. If you spend enough time looking, you can always find some obscure situation that gets made worse. Few language proposals are made 100% of win with absolutely no lose anywhere. This proposal is no different. As I already mentioned, though, that's only true for rather limited forms of refactoring: An IDE's refactor wizard can easily find places where you now have seemingly useless catches, and tell you about them.
On Sep 24, 1:46 pm, Ricky Clarkson <[email protected]> wrote: > Your proposal makes existing code that failed to compile start to compile, > making it harder to refactor code that has throws clauses without leaving > garbage in the codebase. > > On Fri, Sep 24, 2010 at 12:43 PM, Reinier Zwitserloot > <[email protected]>wrote: > > > > > 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 <[email protected]> wrote: > > > On Thu, Sep 23, 2010 at 5:39 PM, Reinier Zwitserloot <[email protected] > > >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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<javaposse%2bunsubscr...@googlegroups > > .com> > > . > > For more options, visit this group at > >http://groups.google.com/group/javaposse?hl=en. -- You received this message because you are subscribed to the Google Groups "The 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.
