[concurrency-interest] Re: Improving RWLock compatibility - ownership test

Tim Peierls tim@peierls.net
Tue, 30 Nov 2004 08:04:26 -0500

Larry Riedel wrote:
> Indeed, the notion of "lock" can be defined broadly enough to
> include such a plethora of non-orthogonal semantics that a
> reference to a "Lock" is effectively useless without knowledge
> of the semantics of the class of the referenced object instance.

Yeah, that Lock interface is practically useless. Let's get rid
of it. While we're at it, has anyone noticed just how little the
List interface contributes? The semantics of ArrayList and LinkedList
are worlds apart, and yet those "experts" keep telling us to gloss
over the difference with that vacuous interface.

That's the great thing about concrete types: you know what you're
getting all the time, and you don't have to worry that some fool
has changed the implementation (and subtle semantics) on you.
Decoupling, shmecoupling.