Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: [OT] Re: missing import java.lang.Comparable Date: Sun, 10 Jul 2016 10:34:29 -0000 (UTC) Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <128e7e20-d311-413d-abbc-e885b34ae402@googlegroups.com> <87dc5bee-f689-4f2e-90a8-a43a2de9fe49@googlegroups.com> <638a1d64-f125-4456-a20b-4dbf45f49da2@googlegroups.com> <60a5ccde-2657-48d6-b3dd-04ec1a0973ab@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 10 Jul 2016 10:34:29 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="10449"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185PHa8S+20xSLThjP0i2glnC+PGLOrwbE=" User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT 3663720 git://git.gnome.org/pan2) Cancel-Lock: sha1:RGJu8jxAWlY4vFov5Z5HaUlSyVI= Xref: csiph.com comp.lang.java.programmer:34841 On Sat, 09 Jul 2016 21:52:28 -0400, Arne Vajhøj wrote: > On 7/9/2016 9:11 PM, Martin Gregorie wrote: >> On Sat, 09 Jul 2016 20:09:23 -0400, Arne Vajhøj wrote: >>> It is one of these things I would just leave to the compiler/VM/RT. >>> >> You can't, because that rules out program portability. > > If data type X has its behavior defined by the specs, then the > compiler/VM/RT should be able to change the implementation all it want > as long as it maintains documented behavior. > Yes, and as Eric pointed out recently, there's a good example of this in Java: the current (1.8) BigDecimal implementation stores values in a long and the implied decimal point as an int scale factor. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |