Resource Block from do() { } to try() { }

Joshua Bloch jjb at google.com
Wed Sep 2 11:46:18 PDT 2009


On Wed, Sep 2, 2009 at 6:11 AM, serge Boulay <serge_boulay at hotmail.com>wrote:

>
> What was the reason the resource block changed from the keyword “do” to the
> keyword “try”.


It feels more like a try-catch ("attempt this computation, then do cleanup")
than a loop ("keep doing this until some condition occurs").

 Is it possibly more confusing using the “try” keyword since you can attach
> a catch and finally clause to the block.


We didn't have to permit this, but found it to be useful in practice.


> What is the scope of exceptions in that block?
>

Not sure I understand what you're driving at; can you provide me with an
example?

       Thanks,

       Josh



More information about the coin-dev mailing list