Re: Arithmetic overflow checking



On 23/07/2011 2:51 PM, lewbloch wrote:
David Lamb wrote:
supercalifragilisticexpialadiamaticonormalizeringelimatisticantations wrote:
Eww. Mutable number classes.

It's what happens to ordinary ints in most machine languages. Feel free
to define the less-efficient functional versions that always generate
new objects. The main point was that the method calls aren't necessarily
all that hard to read.

The "Eww" poster seems fond of making tabloid statements devoid of
engineering reasoning.

Wrong.

Ordinary ints aren't (in Java, at least, with no "int *" type) subject to aliasing and other problems that a mutable Integer-analogue would be.

There's nothing intrinsically wrong with mutable number classes,
particular for the use case under discussion for them, as long as they
aren't used where immutable number classes would be better.

See above.

Though the "Eww" poster is free to provide logic and evidence to
support a contrary position, if they so desire and have the
capability.

See above.
.