Simple Resource Clean-up

Mark Reinhold mr at
Tue Mar 3 19:55:01 PST 2009

> Date: Tue, 03 Mar 2009 10:47:31 -0800
> From: Neal Gafter <neal at>

> This would be the first instance of an annotation that changes the
> meaning of the language's primitive constructs.  Today, this kind of
> thing is the role of declaration modifiers.  We went to great length
> to discourage this kind of use of annotations in the past; annotations
> are to annotate the program text (in a way sometimes visible to
> libraries), not define it.  I understand the reluctance to add new
> keywords to the language, but I advise against adding annotations as
> language modifiers (essentially, adding modifiers with an "@" prefix).

I completely agree.  Annotations are, well, annotations.

> The fact that this kind of flexibility is required suggests the
> facility should be provided by libraries rather than hardcoded into
> the language.

If the only way for a library to support this kind of facility is for
closures to be part of JDK 7, then this facility will not be in JDK 7.

Now maybe I'm missing something, but unless one is going to recommend
that developers use clunky nested classes for this sort of thing then
I don't see how to implement this in a library -- absent closures.

- Mark

More information about the coin-dev mailing list