trying out the prototype

Joe Darcy joe.darcy at oracle.com
Tue Aug 24 11:45:53 PDT 2010


Stephen Colebourne wrote:
> On 24 August 2010 12:14, David Holmes <David.Holmes at oracle.com> wrote:
>   
>>> (I guess this forms a case against the try-with-multiple-resources
>>> statement in general. The list of semicolon-delimited declarations
>>> enclosed by parentheses looks weird, anyway ;-)
>>>       
>> I tend to agree the syntax is awkward and far less readable than simply
>> nesting the try-with statements.
>>     
>
> Overall, I think the semicolon, multi-resource, aspect is more complex
> than the benefits it gives. Clearer code results from nesting the
> statements.
>
>   

I disagree based on my experiences developing tests for the feature.

Compare "testCreateFailure<N>" with "testCreateFailure<N>Nested" in

    
http://hg.openjdk.java.net/jdk7/jdk7/langtools/file/2c1c657f69a4/test/tools/javac/TryWithResources/TwrTests.java

-Joe



More information about the coin-dev mailing list