From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e55245590c829bef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Sat, 06 Nov 2010 13:34:41 +0000 Organization: A noiseless patient Spider Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <82zktq4n9b.fsf_-_@stephe-leake.org> <4cd53555$0$7665$9b4e6d93@newsspool1.arcor-online.net> <1hjbm9sq2q6v6.1o1jb481odeuh$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx01.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="12294"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YuU61WvJ0N4CkHoakwhaoEvSPOGmGL04=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:XBw2bgZGx6Y6WvtfFdA6LeOzlTw= sha1:j5VoHSZlx+hCzHjKJfTvpozGbmM= Xref: g2news1.google.com comp.lang.ada:15329 Date: 2010-11-06T13:34:41+00:00 List-Id: "Dmitry A. Kazakov" writes: > On Sat, 06 Nov 2010 12:00:38 +0100, Georg Bauhaus wrote: > >> On 11/6/10 8:12 AM, Dmitry A. Kazakov wrote: >> >>> Hmm, I would expect you arguing for >>> >>> function "/" (Dividend : T; Divisor : T) return T; >>> >>> For commutative operations like "+" it becomes a bit difficult: >> >> You aren't suggesting the computer-"+" is a commutative >> operation, are you? > > I do. The implementation of "+" is not "strictly" commutative, but its > interface does not tell that. The implied, not stated contract, is > that "+" is indeed commutative allowing certain compiler > optimizations. A numeric expression denotes a set of results > satisfying certain conditions (accuracy constraints required by the > ARM). Within these limits "+" is "weakly" commutative. One would very much _hope_ that these two would behave commutatively, of course. function "+" (L : Time; R : Duration) return Time; function "+" (L : Duration; R : Time) return Time;