Automatic Resource Management, V.2

Bruce Chapman brucechapman at
Mon Apr 20 04:00:34 PDT 2009

Joshua Bloch wrote:
> Fellow Coiners,
> Thanks for all your feedback on the Automatic Resource Management proposal.
>  I have revised the proposal in light of these comments.  The new version
> (V.2) can be seen at this URL:
> . It is included below for
> archival purposes.
>    Josh
- SNIP -
> An automatic resource management statement with a single resource expression
> and no *Finally* or *Catches* would behave as if replaced by the following
> source code:
> {
>     final *T**ype* #localVar = *Expression*;
The type in the generated declaration above could simply be AutoClosable 
rather than the specific type of the expression? (and especially so if 
the expression had a type which was an intersection type - which I think 
is possible).


More information about the coin-dev mailing list