Feedback and comments on ARM proposal

Florian Weimer fw at
Sat Mar 21 10:00:10 PDT 2009

* Joshua Bloch:

> I think it might be easier to specify (and implement the package variant.
>  Roughly speaking, the legal types for "manageable resources" are those that
> are assignment compatible with one and only one of the classes in
>  While it's not generally possible to enumerate over classes
> in a package, the compiler can be (are, in fact) tied to particular versions
> of the platform so this shouldn't present too big a problem (though it could
> limit extensibility by JRE hackers).

If the interface has to reside in a package,
you could name the interface by the name of the method, and generate
implementations automatically.  For instance, would behave as if it were implemented as

    public interface foo {
        foo() throws Exception;
    } would look like this:

    public interface Closeable extends {
        public void close() throws IOException;

If some other language mechanism eventually made this obsolete, those
generated interfaces could likely incorporate this mechanism

But perhaps this is too cute (but I think similar approaches where
proposed to deal with tuples).

More information about the coin-dev mailing list