[concurrency-interest] Re: AtomicInteger and AtomicLong should implement Number

Tim Peierls tim@peierls.net
Sun, 04 Jan 2004 07:56:34 -0500

Gregg Wonderly wrote:
>>It seems really odd to not have [AtomicInteger and
>>AtomicLong] implement Number.

Larry Riedel wrote:
> Let me count the ways Java is odd or just plain lame.  I would
> like to imagine the new stuff tries not to be encumbered by
> antediluvian cruft like java.lang.Number, which is a Class,
> not an Interface, and thus kind of Useless, thanks to the Java
> precept that multiple inheritance of implementation is Evil,
> leaving us with objects and "containers" duct taped together
> with byzantine naming conventions, "dynamic Proxy"s, etc.

And there's the less colorful reason that Number is implemented
in the JDK only by immutable classes, which the AtomicXXX
classes are most definitely not.