[concurrency-interest] java.util.collections

Dmitry Kiriy dmitry.kiriy@db.com
Wed, 11 Feb 2004 18:13:09 +0300

Thats why Java community raise something good - different point of view :)
Dmitriy Kiriy

Doug Lea <dl@cs.oswego.edu>
Sent by: concurrency-interest-admin@cs.oswego.edu
11.02.2004 18:03

        To:     Dmitry Kiriy/Moscow/DMG UK/DeuBa@DMG UK
        cc:     concurrency-interest@altair.cs.oswego.edu
        Subject:        Re: [concurrency-interest] java.util.collections

> There at least 2 types of Java developers:

Hoping to preempt another different-types-of-developers discussion,
here's a different view.  In retrospect, I guess the API design
philosphy in effect here is an "obviousness rule"; something like:

  A JDK API should be easy to use only if it always does what someone
  otherwise unfamiliar with it would expect it to do.  If you cannot
  make an API sufficiently obvious, then you should either make it so
  hard to use that only experts will try to use it, or leave it out

So, in the case of concurrent maps via read-write locks, any expert
developer can do this themselves, especially given the guidance we
provide. They'll be unhappy that they are forced to do something so
tedious. But the net result is probably better this way than if we
made it too easy to apply concurrentMaps to, for example, those Apache
commons collections that they wouldn't work right for.

(On the other hand, classes like AbstractQueuedSynchronizer, which
will do what you want only after hard work and experimentation, are so
scary-looking that no one is going to try to use them by accident.)

Concurrency-interest mailing list