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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4961da398a273222 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-06 12:51:23 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!rutgers!uwvax!zebu.heurikon.com!news.sprintlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!mp.cs.niu.edu!fnnews.fnal.gov!gw1.att.com!nntpa!not-for-mail From: ka@socrates.hr.att.com (Kenneth Almquist) Subject: Re: Ada self-referential operators Message-ID: Sender: news@nntpa.cb.att.com (Netnews Administration) Nntp-Posting-Host: socrates.hr.att.com Organization: AT&T References: <3gnkjb$gso@miranda.gmrc.gecm.com> <3grqrf$jkd@gnat.cs.nyu.edu> Date: Mon, 6 Feb 1995 20:51:23 GMT Date: 1995-02-06T20:51:23+00:00 List-Id: Robert Dewar wrote: > It is not that I think :+= is peculiar because it is not in the RM, rather > +:= is not in the RM because it is peculiar, i.e. it would be VERY difficult > to put it in without running into nasty semantic ramifications. Perhaps I'm missing them. What about the following rules? 1. For each function of the form function "+"(L: type_1; R: type_2) return type_1; where type_1 is not limited, implicitly define: procedure "+:=" (L: in out type_1; R: in type_2) is begin L := L + R; end "+:="; These implicit definitions should behave similarly to the implicit definitions of "/=" which occur in Ada 83 and Ada 95. Explicit defintions of "+:=" are illegal. 2. If a statement of the form "A +:= B;" is encountered, treat it as the procedure call "+:="(A, B). Kenneth Almquist