Automatic Resource Management, V.2
neal at gafter.com
Tue Apr 21 08:52:38 PDT 2009
On Tue, Apr 21, 2009 at 8:34 AM, Joshua Bloch <jjb at google.com> wrote:
> Yes, this is the situation that Bruce Chapman pointed out earlier. As a
> practical matter, I suspect that resources will have rather simple types,
> but still the spec does have to cover this situation. If you have a good
> solution, feel free to share. Otherwise, hang on, and we'll see what we can
> come up with.
In the LocalVariableTypeTable, conjunctive types should be simple to add.
Recursive types can be handled by introducing backreferences.
You can probably avoid this mess by being explicit about the specification
rather than attempting the "as-if" rewriting. If a construct like this is
to be integrated into the JLS that would probably be required anyway, and a
new set of issues is likely to be exposed by the attempt. It would be
better to get the specification wrung out earlier rather than later (I don't
think Alex will be eager to do it himself).
More information about the coin-dev