From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: C like op= proposal
Date: 1999/08/15
Date: 1999-08-15T00:00:00+00:00 [thread overview]
Message-ID: <Pine.BSF.4.10.9908151023060.10801-100000@shell5.ba.best.com> (raw)
A few weeks ago the topic of the readability of C's op= construct
vis-a-vis the Ada "lhs := lhs op operand;" statements, with the general
tenor being that the C syntax is more readable, at least in cases where
"lhs" is some fairly long identifier, perhaps an array embedded in a
record being incremented or otherwise operated upon. I remembered reading
about a language which had a more general approach to this, allowing a
pseudo-variable, say "@" to represent the old value of the left hand side
of an assignment in the right hand side, thus allowing things like
lhs := @ + 1; -- C: lhs++;
lhs := @ * 5; -- C: lhs *= 5;
lhs := 1/@ + 5*(@/2 + @ ** 2); -- C doesn't do so good here either!
Was anything like this ever discussed for Ada? Assuming some acceptable
notation was chosen for the pseudo-variable ("_" works, but stands out
less to my eye than "@"), would people find this more or less readable
than the current verbose approach?
-- Brian
next 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 Brian Rogoff [this message]
1999-08-15 0:00 ` C like op= proposal Ray Blaak
1999-08-15 0:00 ` Brian Rogoff
1999-08-16 0:00 ` Gautier
1999-08-17 0:00 ` Samuel Tardieu
1999-08-17 0:00 ` Gautier
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 ` Ted Dennison
1999-08-18 0:00 ` Jeff Carter
1999-08-18 0:00 ` Keith Thompson
1999-08-19 0:00 ` Tarjei T. Jensen
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 ` Lance Kibblewhite
1999-08-19 0:00 ` tmoran
1999-08-19 0:00 ` Ted Dennison
1999-08-19 0:00 ` Michael F. Yoder
1999-08-21 0:00 ` Keith Thompson
1999-08-18 0:00 ` Robert I. Eachus
1999-08-18 0:00 ` Gautier
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 ` Andi Kleen
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