On Tue, Jun 17, 2014 at 11:33 PM, Tom Kaitchuck <
tom.ka...@gmail.com> wrote:
> 2. The pattern of obtain and release. This occurs fairly frequently in a lot
> of use cases. IE: resource pooling, classes that have some sort of create /
> finalize contract, etc.
Well, FTR, in Ceylon 1.1 we already have quite good support for those
patterns with try and Destroyable/Obtainable. But the thing about
stamped locks is that they just return a number. Which is good for
performance. But Destroyable/Obtainable don't support that.
More recently I have been asking myself if the try is really
necessary: why can't we just automagically clean up any Destroyable
resource instantiated in a block when the block finishes executing?