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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!2a02:590:1:1::196.MISMATCH!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: _Type vs no _Type Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH 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> Date: Sat, 6 Nov 2010 08:12:29 +0100 Message-ID: NNTP-Posting-Date: 06 Nov 2010 08:12:27 CET NNTP-Posting-Host: 733792ec.newsspool4.arcor-online.net X-Trace: DXC= On Fri, 05 Nov 2010 17:40:49 -0700, Jeffrey Carter wrote: >> function "+"(X, Y: T) return T; >> >> Named notation never, ever, ever makes sense for operators. > > I agree, but use Left and Right for consistency. Hmm, I would expect you arguing for function "/" (Dividend : T; Divisor : T) return T; For commutative operations like "+" it becomes a bit difficult: function "+" (2 * Summand : T) return T; -- (:-)) which BTW, illustrates another problem. The name meaningful for the client is not necessarily meaningful for the implementation and conversely. For the client of "+" operands are equivalent and names should reflect this fact, but cannot. An implementation of "+" will have to distinguish operands and Left/Right is a poor choice because unrelated to the implementation. For primitive operations you even allowed to rename arguments, which is looks very implementation-oriented. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de