Feedback and comments on ARM proposal

Joshua Bloch jjb at
Fri Mar 20 14:19:16 PDT 2009

This is very clever!  While it doesn't allow programmers to create their own
interfaces for use with the construct, it allows future release of the
platform to broaden the applicability of the construct without changing the
language.  And it does so without abusing annotations.  While it's not a
typical uses of packages, it wouldn't be the first time the language gave
special standing to a package.  For example, members of java.lang are
automatically imported on demand.

What do others think?


On Fri, Mar 20, 2009 at 2:08 PM, Tim Peierls <tim at> wrote:

> How about using a special package --, say -- with initially
> only one or two interfaces -- AutoCloseable and AutoDisposable, say -- and
> word the ARM proposal so that only subtypes of interfaces with a single,
> parameterless method that are declared in this special package are allowed
> in the ARM try-initialization?
> The idea here is to remove the decision about which clean-up methods to
> support from the current proposal and make it a library design issue.
> --tim

More information about the coin-dev mailing list