Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations Newsgroups: comp.lang.java.programmer Subject: Re: Arithmetic overflow checking Date: Sat, 23 Jul 2011 22:39:27 -0400 Organization: supercalifragilisticexpialadiamaticonormalizeringelimatisticantations Lines: 29 Message-ID: References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <2rydnez7l-H5BYnTnZ2dnUVZ_vGdnZ2d@earthlink.com> <4e278a67$0$309$14726298@news.sunsite.dk> <1SSVp.69032$_I7.18660@newsfe08.iad> <4b8422e6-9ad6-493e-b5a5-3c8a772851de@u6g2000prc.googlegroups.com> NNTP-Posting-Host: cJ+uP0NdDAbt8UCZbZVtiQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: WinVN 0.99.12z (x86 32bit) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6494 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.