Proposal: Automatic Resource Management
mark at twistedbanana.demon.co.uk
Sun Mar 1 01:54:33 PST 2009
On 28 Feb 2009, at 19:08, Joshua Bloch wrote:
> On Sat, Feb 28, 2009 at 7:41 AM, Neal Gafter <neal at gafter.com> wrote:
>> The compatibility section must document incompatibilities, whether or
>> not you judge them likely to cause problems in practice.
> Good point. I will add this one. And I am still interested in
> anyone can find some code in an existing codebase that tickles this.
The worst case I've turned up so far is the following, which would
not be broken by your proposal, but I think it would be restricted in
its ability to take advantage of it without further changes downstream:
Here, the class DataCacheManagerImpl implements two interfaces, both
of which could logically be retrofitted with Disposable<X>, but doing
so would then break DataCacheManagerImpl since different type
arguments would be needed (Exception and RuntimeException).
(I think the idea is that an alternative implementation of
DataCacheManager can be specified by the user of this library; it
seems quite likely that these would extend the default
Depends on how ticklish you are I guess. For me it's a hint that an
interface may not be the best mechanism.
More information about the coin-dev