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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-17 09:02:37 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc54.POSTED!not-for-mail Message-ID: <3F90128B.3050805@comcast.net> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: += in ada References: <3F7316F7.219F@mail.ru> <17cd177c.0310010606.52da88f3@posting.google.com> <3F8BC74F.2CFBFF37@0.0> <1066312000.671303@master.nyc.kbcfp.com> <1066400493.692750@master.nyc.kbcfp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc54 1066406556 24.34.139.183 (Fri, 17 Oct 2003 16:02:36 GMT) NNTP-Posting-Date: Fri, 17 Oct 2003 16:02:36 GMT Organization: Comcast Online Date: Fri, 17 Oct 2003 16:02:36 GMT Xref: archiver1.google.com comp.lang.ada:1088 Date: 2003-10-17T16:02:36+00:00 List-Id: Hyman Rosen wrote: > If you're talking about Ada, augmented assignment operators don't > exist, so they cannot need anything. It's equally accurate to say > that every legal use of an augmented assignment operator in Ada > requires the sacrifice of a goat. I wish we had a way to recommend posts here, so I could recommend yours. > If Ada were augmented with augmented assignment operators, I imagine > their specifications would not be so deliberately obtuse as to require > what you are suggesting. Augmented assignment operators would get the > target of the assignment as an 'in out' parameter, at least in the > user-defined case. For built-in arithmetic, it hardly matters; there > it's the notational convenience that's desired, not the efficiency. If you look at what I said in another thread, I think we are on to something. Addding += (or whatever notation) to Ada is a non-starter. It won't happen. But we are discussing the wrong C notation when we discuss +=. The real analog to Inc is ++. Adding Foo++ to Ada won't happen either, but ++Foo; is not totally crazy, and clearly corresponds to Inc(Foo); which I think everyone recognizes is reasonable Ada, just not currently predefined. How much effort would it be to add it to Ada? Good question. For the predefined integer and character types, it would be trivial. (Add a few declarations to Standard.) Adding it as a predefined operation for all integer and enumeration types would be a lot more effort, but not out of the scope of a language revision like the one currently underway. I am certainly not going to suggest adding Inc to Ada 200X. IMHO, there are many more important additions to the language, and not all of them will make it in due to time and resource limitations. But if you think that Inc (or ++) is important, go for it. But as for += and its brothers, that would just be wasting everyone's time. -- Robert I. Eachus "Quality is the Buddha. Quality is scientific reality. Quality is the goal of Art. It remains to work these concepts into a practical, down-to-earth context, and for this there is nothing more practical or down-to-earth than what I have been talking about all along...the repair of an old motorcycle." -- from Zen and the Art of Motorcycle Maintenance by Robert Pirsig