comp.lang.ada
 help / color / mirror / Atom feed
* C like op= proposal
@ 1999-08-15  0:00 Brian Rogoff
  1999-08-15  0:00 ` Ray Blaak
  1999-08-16  0:00 ` Robert Dewar
  0 siblings, 2 replies; 33+ messages in thread
From: Brian Rogoff @ 1999-08-15  0:00 UTC (permalink / 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






^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~1999-08-23  0:00 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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               ` Gautier
1999-08-18  0:00               ` Ted Dennison
1999-08-18  0:00                 ` Robert I. Eachus
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                       ` tmoran
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                       ` Ted Dennison
1999-08-19  0:00                     ` Michael F. Yoder
1999-08-21  0:00                       ` Keith Thompson
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-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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox