Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!news2.google.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, 24 Jul 2011 17:41:34 -0500 Date: Sun, 24 Jul 2011 15:41:28 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Arithmetic overflow checking References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <4e262731$0$314$14726298@news.sunsite.dk> <4e26300b$0$309$14726298@news.sunsite.dk> <4e26b4ed$0$2501$db0fefd9@news.zen.co.uk> <4e28097f$0$2533$da0feed9@news.zen.co.uk> <7a23c9d2-508f-4dbd-af91-8cdf2a9764e1@p29g2000pre.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 27 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.200.239 X-Trace: sv3-C2Kq3gMeugs2DvWy25oGQ4OzMTc2PZsttqFH8LOVxdA4tVa/aP/t+p5+yw9gILaYdY6pWq1tsbaLmsb!MEBe4iehquQuNsuUNMxR3hfrcTmawC8cA+CIL8sfaWFWJkQ/aetHo2ydYKMsY+K9UjmXK/BtbF+r!/bfaeF6nEPM1YaDF+RWkIJ9IEnn9UT0wT32Bb1tFR7sGK4Q= 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: 3131 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6519 On 7/24/2011 3:15 PM, markspace wrote: > On 7/24/2011 12:53 PM, Patricia Shanahan wrote: >> I still don't see the advantage over a marker interface. > > > The advantage of a class instead of an interface is that extends is > required. Since Java doesn't support multiple inheritance, opportunities > for abuse are reduced. I also think there is a mental barrier to is-a > abstract class versus just a marker interface. The former has design > implications that many would not wish to break just to get a little > operator overloading. > > > I don't see how forcing is-a Number distinguishes between arithmetic types and non-arithmetic types. The main feature of Number is a set of methods that presume natural mapping from each Number subclass into the real line. If people are expected to live with that for arithmetic types that are not subsets of the reals, why do you believe they will be reluctant to live with it for non-arithmetic types, some of which do have a natural mapping into the reals? Patricia