Re: Arithmetic overflow checking
- From: Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx>
- Date: Mon, 25 Jul 2011 10:20:48 -0700
On 7/23/2011 7:39 PM, supercalifragilisticexpialadiamaticonormalizeringelimatisticantations wrote:
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.
Then I suppose you'd have no objection to making the Matrix class immutable and implicitly copying itself every time you do an operation. I really appreciate that when using Householders to find eigenvalues in my small 10Kx10K matrix.
--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.
- Follow-Ups:
- Re: Arithmetic overflow checking
- From: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
- Re: Arithmetic overflow checking
- References:
- Arithmetic overflow checking
- From: rop rop
- Re: Arithmetic overflow checking
- From: Patricia Shanahan
- Re: Arithmetic overflow checking
- From: MikeP
- Re: Arithmetic overflow checking
- From: Patricia Shanahan
- Re: Arithmetic overflow checking
- From: MikeP
- Re: Arithmetic overflow checking
- From: Arne Vajhøj
- Re: Arithmetic overflow checking
- From: Arved Sandstrom
- Re: Arithmetic overflow checking
- From: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
- Re: Arithmetic overflow checking
- From: Andreas Leitgeb
- Re: Arithmetic overflow checking
- From: David Lamb
- Re: Arithmetic overflow checking
- From: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
- Re: Arithmetic overflow checking
- From: David Lamb
- Re: Arithmetic overflow checking
- From: lewbloch
- Re: Arithmetic overflow checking
- From: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
- Arithmetic overflow checking
- Prev by Date: Make money.
- Next by Date: Re: Arithmetic overflow checking
- Previous by thread: Re: Arithmetic overflow checking
- Next by thread: Re: Arithmetic overflow checking
- Index(es):
Relevant Pages
|