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,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-03 04:46:55 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp.itservices.ubc.ca!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X Date: Tue, 03 Jun 2003 07:46:49 -0400 Organization: MindSpring Enterprises Message-ID: <3EDC8AA9.7000405@noplace.com> References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED41344.7090105@spam.com> <3ED46D81.FF62C34F@0.0> <3ED46E07.4340CABC@0.0> <3ED4F3FD.A0EF7079@alfred-hilscher.de> <6vWcnTWjF83bD0qjXTWcpA@gbronline.com> NNTP-Posting-Host: d1.56.b0.ad Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Server-Date: 3 Jun 2003 11:46:55 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:38455 Date: 2003-06-03T11:46:55+00:00 List-Id: A question comes to mind: Is there any reason why a compiler cannot recognize "A := A + B;" as a special case and create an optimized solution equivalent to "A += B;"? A second question is: If they can detect and optimize this, are there any compilers that do so? A third question is: Supposing the syntax were added - would any compilers start generating the optimized answer? It isn't at all clear to me that adding such syntax is going to get compilers to do a better job than they might already be doing. It might be interesting to see of Gnat generates substantially different code for the Ada expression than it does for the C expression. MDC Lutz Donnerhacke wrote: > > > Yes, that's the Ada way. But for a lot of simple functions over simple data > types, defining such procedures is a pain. -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "In general the art of government consists in taking as much money as possible from one class of citizens to give to the other." -- Voltaire ======================================================================