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,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-15 11:07:46 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!adsl-213-200-246-247.cybernet.CH!not-for-mail From: Vinzent 'Gadget' Hoefler Newsgroups: comp.lang.ada Subject: Re: += in ada Date: Wed, 15 Oct 2003 20:06:39 +0200 Organization: JeLlyFish software Message-ID: References: <49cbf610.0310101231.2358762a@posting.google.com> <1066224357.499523@master.nyc.kbcfp.com> <1066231159.711433@master.nyc.kbcfp.com> Reply-To: v.hoefler@acm.org NNTP-Posting-Host: adsl-213-200-246-247.cybernet.ch (213.200.246.247) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 1066241265 24809391 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:911 Date: 2003-10-15T20:06:39+02:00 List-Id: Hyman Rosen wrote: >Vinzent 'Gadget' Hoefler wrote: >> So, what's your point? ;-) That it is not "built-in"? > >My point is that "augmented assignment" is a very old >feature of programming languages. And my point is that Ada already has it. It just calls it "procedure". :) >In fact, it's a basic >feature of computers, since most of them have machine >instructions which add one thing to another. You heard about "abstraction"? Ada is a high level *language*, not a high level assembler. The idea was to let the programmer say what it wants and let the compiler figure out how to map that onto the target hardware, not the C-way: figuring out how to express what we want in such a way that most machines might understand it. Ada is even better: It still left the option open to get down to the bare metal of the machine if this is needed. Target hardware (do you remember the PDP-7? - I don't.) becomes obsolete some times. :) Why doesn't know C shit about interrupts? Or port I/O? Or ring buffer data structures? So basic features of some CPUs... oh well, perhaps not at the time they designed C, I know. Bad luck if you want to do that. But hey, it must be fucking cool, you still have 'augmented assignment'. Oh well, that's surely a pretty nifty feature you really need, just because you can save so much time when typing it (and IMVHO: *that* is the only true and valid argument). And BTW, it's a funny thing that the compiler might compile |a +=3D 2; to | movl a,%eax | addl $2,%eax | movl %eax,a instead of | addl $2,a , isn't it? ;-P Vinzent. --=20 Parents strongly cautioned -- this posting is intended for mature audiences over 18. It may contain some material that many parents would not find suitable for children and may include intense violence, sexual situations, coarse language and suggestive dialogue.