Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Arithmetic overflow checking Date: Tue, 19 Jul 2011 18:07:19 -0700 Organization: A noiseless patient Spider Lines: 31 Message-ID: References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <1f9c17dltrhlmhifuigoa914477r4rg1e1@4ax.com> <09fe171s46ilvq9qmn254dctunm6noh0ps@4ax.com> <4e262731$0$314$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 20 Jul 2011 01:07:21 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="6404"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iYAYIxtuFMomoZG72Iee9GR1cyhAHvo4=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <4e262731$0$314$14726298@news.sunsite.dk> Cancel-Lock: sha1:8KYTKFCyaVFEBqNJJEiCEvOernU= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6296 On 7/19/2011 5:54 PM, Arne Vajhøj wrote: >> On Jul 8, 10:27 am, Gene Wirchenko wrote: >>> Java is designed to behave that way. That does not mean that it >>> is not wrong. > On 7/8/2011 4:15 PM, lewbloch wrote: >> >> It doesn't mean that it is wrong. >> > Yes, but given that there are already two languages under discussion, > then it seems rather obvious that his point is that Java should have > been designed different 16 years ago not change overflow handling > in Java 8. I think the point being made is that it's behavior that could be improved *now*. The prescience required to see 16 years into the future is darn hard. I don't think anyone at all has that kind of skill or knowledge. It would have been better however to acknowledge sometime in the past that Java needed to be improved in some fundamental ways and then make those changes. Generics should have been reifiable, primitives should be "first class objects," integer math should be checked for overflow where the programmer deems needed. These things have been lacking for some time, and are still needed, imo.