Automatic Resource Management, V.2

howard.lovatt at howard.lovatt at
Tue Apr 21 17:27:44 PDT 2009

Hi Josh,

On Apr 22, 2009 5:44am, Joshua Bloch <jjb at> wrote:


> 1. The use of try does not seem natural; it is too tied in my mind to

> Exceptions,
> But there are exceptions involved here! A main point of the construct is  
> that it closes resources,
> even in the presence of exceptions. I think that's why others find it so  
> natural.

None of these decisions are ever easy, if they were we wouldn't be  
discussing them! I can see the exception argument; but on balance I would  
find another approach better, ie either a different keyword or better still  
closing based on variable scope. At the end of the day I find all of these  
three solutions, try, other keyword, or scope, better than what we  
currently have and therefore support any of the variations.

-- Howard.

More information about the coin-dev mailing list