From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: C like op= proposal
Date: 1999/08/15
Date: 1999-08-15T00:00:00+00:00 [thread overview]
Message-ID: <Pine.BSF.4.10.9908152124300.7953-100000@shell5.ba.best.com> (raw)
In-Reply-To: m3d7wosq6h.fsf@vault84.infomatch.bc.ca
On 15 Aug 1999, Ray Blaak wrote:
> Brian Rogoff <bpr@shell5.ba.best.com> writes:
> > lhs := @ + 1; -- C: lhs++;
> > lhs := @ * 5; -- C: lhs *= 5;
> > lhs := 1/@ + 5*(@/2 + @ ** 2); -- C doesn't do so good here either!
>
> This is not worth the trouble of changing the language, especially considering
> that one can already do this:
>
> declare
> lhs : Some_Type renames Long_And_Complicated_Lvalue;
> begin
> lhs := lhs + 1; -- C: lhs++;
> lhs := lhs * 5; -- C: lhs *= 5;
> lhs := 1/lhs + 5*(lhs/2 + lhs ** 2); -- C doesn't do so good here either!
> end;
Well, that won't work for the case I described, in which lhs is or
contains an array being indexed, unless you rename each occurrence
every time through the loop. But I guess that would be the correct Ada
approach. Seems awfully heavyweight compared to the C approach and what I
sketched.
It's certainly not any more than syntactic sugar, but if I were designing
my own Ada like language from scratch, would it be worth including
such a facility?
-- Brian
next prev parent reply other threads:[~1999-08-15 0:00 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-15 0:00 C like op= proposal Brian Rogoff
1999-08-15 0:00 ` Ray Blaak
1999-08-15 0:00 ` Brian Rogoff [this message]
1999-08-16 0:00 ` Gautier
1999-08-17 0:00 ` Samuel Tardieu
1999-08-17 0:00 ` Andi Kleen
1999-08-18 0:00 ` Robert Dewar
1999-08-17 0:00 ` Brian Rogoff
1999-08-18 0:00 ` Robert Dewar
1999-08-18 0:00 ` Brian Rogoff
1999-08-19 0:00 ` Robert Dewar
1999-08-21 0:00 ` Brian Rogoff
1999-08-23 0:00 ` Robert A Duff
1999-08-18 0:00 ` Gautier
1999-08-18 0:00 ` Ted Dennison
1999-08-18 0:00 ` Jeff Carter
1999-08-18 0:00 ` Keith Thompson
1999-08-19 0:00 ` Michael F. Yoder
1999-08-21 0:00 ` Keith Thompson
1999-08-19 0:00 ` Tarjei T. Jensen
1999-08-19 0:00 ` tmoran
1999-08-19 0:00 ` Lance Kibblewhite
1999-08-19 0:00 ` Robert Dewar
1999-08-20 0:00 ` P.S. Norby
1999-08-21 0:00 ` Robert Dewar
1999-08-19 0:00 ` Ted Dennison
1999-08-18 0:00 ` Robert I. Eachus
1999-08-18 0:00 ` Andi Kleen
1999-08-17 0:00 ` Gautier
1999-08-18 0:00 ` Gautier
1999-08-17 0:00 ` John Duncan
1999-08-17 0:00 ` Gautier
1999-08-16 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox