--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I propose to issue a warning for `try` without a `catch` or `finally`. Any objections?
I was actually thinking the same thing, in what way is "try" even needed?expr catch { case _: NullPointerException => whatever }
andexpr finally { … }and
expr catch { case _: NullPointerException => whatever } finally { … }
and
expr finally { … } catch { case _: NullPointerException => whatever }
All makes sense to me and don't need try at all.Any counter arguments?
Using that argument, try without catch or finally must be verboten, it deviates without clear reason.
>
> -jason
Using that argument, try without catch or finally must be verboten, it deviates without clear reason.
}}% javac ./J.java%
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Sun, Feb 10, 2013 at 8:32 PM, Paul Phillips <pa...@improving.org> wrote:
Does it?On Sun, Feb 10, 2013 at 11:07 AM, √iktor Ҡlang <viktor...@gmail.com> wrote:
Using that argument, try without catch or finally must be verboten, it deviates without clear reason.
class X implements AutoCloseable {public void close() { }}public class J {public void foo() {try (X x = null) {return;}
Wow. Just wow.I'll go eat some ice cream now
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Indeed, but the way I formulated my argument leaves Paul's counter-argument valid. :-)
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-languag...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.