closures after all?

Bob Lee crazybob at crazybob.org
Fri Nov 20 11:49:59 PST 2009


On Fri, Nov 20, 2009 at 11:26 AM, Neal Gafter <neal at gafter.com> wrote:

> As you are well aware, there is controvery about which types matter.  A
> spec
> based on extension methods can be used to support all of the types that we
> discussed, not just the ones you consider to matter.
>

Neal,

Manual resource cleanup is very common and difficult to get right,
especially when > 1 resources are involved. Out of the 110 places where the
otherwise exemplary JDK code opens and closes resources, 2/3rds can leak.
Not one suppresses exceptions in what I think is the proper fashion [1].

Users need a first class solution. ARM blocks rise to that level. My
intuition is that a closures + extension methods approach will not, but I
haven't seen either of those proposals yet. There isn't much point in
arguing about it until I do.

Bob

[1] http://crazybobs-talks.googlecode.com/svn/trunk/out/foj.pdf



More information about the coin-dev mailing list