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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-18 13:59:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.gbronline.com!news.gbronline.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 18 Sep 2003 15:59:30 -0500 Date: Thu, 18 Sep 2003 16:00:59 -0500 From: Wes Groleau Reply-To: groleau@freeshell.org Organization: Ain't no organization here! User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en, es-mx, pt-br, fr-ca MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? References: <3F650BBE.4080107@attbi.com> <3F67AAC6.2000906@attbi.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 69.9.86.112 X-Trace: sv3-LByYL0n4FqRBqCH8Fjel2xdGO8OyNoUEKGDT+dn40h349gcPyzvEIPyRYs4dCjdm1GFwiwJCvVpN4Ei!Ly2OFuWBS9cGjWXRUjZCNLdTuaVG+rv6VTy/E5CV+oRyWaRY/3oJO8f9WoOqXjXok3owXrpddgRd!Eg== X-Complaints-To: abuse@gbronline.com X-DMCA-Complaints-To: abuse@gbronline.com 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.1 Xref: archiver1.google.com comp.lang.ada:42669 Date: 2003-09-18T16:00:59-05:00 List-Id: "Mark A. Biggar" wrote in message >>You may or may not be able to turn this off. The problem is that the >>Ada LRM says that on any assignment if an exception is raised when >>evaluating the RHS then the LHS shall be left unchanged. So unless the >>compiler can determine that no such exception is possible it has to use >>a temporary. This of course is yet another instance of solving the >>halting problem in the general case. The LRM does not say anything about what "short circuit assignment" does because Ada doesn't have it, so as you say... >>Now. as Ada doesn't currently have ops like += they could be add to the >>language in such a way to not abide by the above rule. But, that would >>break the semantic equavalence between "A := A + B;" and "A += B;". 1. If no exception raised, semantically equivalent. 2. If exception raised, result undefined. So Russ gets what he wants--no temporary. But as you hinted, he's wrong about assignment always requiring a temporary. And, as others have said, Ada already allows you to write a procedure that meets rules 1 & 2 above. Add (B, Into => A); Yes, I know--twelve keystrokes too many! :-) -- Wes Groleau Genealogical Lookups: http://groleau.freeshell.org/ref/lookups.html