[concurrency-interest] More on: AtomicInteger and AtomicLong should implement Numbe
Fri, 09 Jan 2004 11:55:35 -0500
"Shaffer, Darron" <Darron_Shaffer@stercomm.com> wrote:
>...I'm not saying that these particular examples are correct, just that SOMEONE
>will want to do SOMETHING along these lines. Should it be possible?
I don't see why it should be. I believe that these atomic classes should not be used interchangeably with the built-in primitive wrappers. Why? Because their purpose is to facilitate concurrent programming, and if they're used interchangeably with the built-in primitive wrappers, then they are being used for a different purpose.
Will this decision make someone's life harder? Conceivably. But not probably. The atomic classes should always be used privately, as part of some other object's private state, and not exposed to the outside world where they might be provided to something like a formatter. Making them Numbers would suggest to programmers that they could reasonably expose them to the outside world, which would be wrong.
New! Unlimited Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
Act now to get a personalized email address!
Netscape. Just the Net You Need.