"Thanks for the reference, it does appear that the issue was settled in the
DOM WG. I would have personally leaned the other way, preferring to detect
and throw an exception when an expression has
resulted in a negative count instead of interpreting it as a
platform-dependent large number. I personally don't see the elimination of
"unsigned" as a limitation of the Java platform, but a
purposeful elimination of a dangerous behavior. I would lobby that you
reconsider the use of unsigned in future DOM interfaces."
I disagree with that. Its an issue of the fact that there exist unsigned
values in the world, and therefore not having a means to model an unsigned
number is a limitation, not the other way around. The checks have to be done
either way. You either check for something to have gone negative, or you
check that it would have overflowed.
In most practical cases like the one we are discussing here, it works the
same way either way. If you don't check your calculation before you pass in
the index, and it turns into 0xFFFFFFFA, for instance, that's going to get
caught as an index error just the same, unless you happen to have almost 4
billion attributes (or whatever you are indexing.)
And lets face it, people in the Java world have to bend over backwards in
many cases to get the wrap around effect, because its a core part of many
low level algorithms (such as checksums and CRCs and such.) Java's lack of
such means that people have to waste space and use the next larger size of
signed value and play all kinds of tricks.
Basically, given the nature of Java, they could have easily supported
unsigned values and provided the means to check for overflow when you wanted
it. That would have made for a more powerful language, but of course Java
wasn't intended to be powerful anyway, right?
--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]