Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 15 May 2011 10:15:39 -0500 Date: Sun, 15 May 2011 08:15:37 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Java puzzler References: <4db69c13-878f-4806-adb2-a3c5adb1c48c@glegroupsg2000goo.googlegroups.com> <-8mdnSRPEIdA21HQnZ2dnUVZ_j2dnZ2d@earthlink.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 20 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.8.126.96 X-Trace: sv3-AuFKhmNm6cSnJhrhhsyihLxLxnYyJzKblsltspAeWrNhS8mlroNGRKkUKm027piGuIxgNMrMlQIhweY!p4invzcBA8vikrBrly3NIjbkGV0wFdWvmM8hLLf4aDKermXB2DANvMIjPp3fIABbOtpjVX3kCz9D!dOFIHAiIKmmXyJozSAEqojWKn3kTOJzE2fAAklT+MSM= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2685 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4123 On 5/15/2011 8:11 AM, markspace wrote: > On 5/15/2011 7:35 AM, Patricia Shanahan wrote: >> I don't think adding exceptions for arithmetic overflow would be a >> sensible change as a modification for Java. If it affected existing code >> it would break a lot of programs. > > > And if you'd read what I actually wrote, you'd see that I asked for an > *OPTIONAL* keyword that could be used when modulo arithmetic is not > desirable. > Indeed. Indeed, that is why the immediately following sentence in my article was "If it did not, it would add a lot of complexity to the language.". You would, in effect, end up with two sets of rules for Java arithmetic, plus the rules for deciding which rules to apply to each calculation. Patricia