'=' vs '<-' vs '.ne' vs '==' vs ':=' vs '.eq.' vs ...

Geoff Arnold geoff at suneast.uucp
Wed Jul 9 22:12:53 AEST 1986


>>Path: ..!topaz!gaynor (Silver @ Rutgers Univ., New Brunswick, N.J.)
>>
>>I give my preferences, and why.
>>
>>ASSIGNMENT  <-
>>
>>It visually seems more consistent with the programming paradigm, 'move
>>this value there'.  

Well, to my mind the only language that ever got it RIGHT was POP-2:

	Rvalue -> Lvalue

(yeah, I know that using Rvalue and Lvalue in this context is bizarre...).
It seems more consistent with the sequential nature of the language
(sorry - English chauvinism strikes again).  Using the usual

	Lvalue <assignment_op> Rvalue

form always looks as though we're a bit ashamed of the fact that these
languages are procedural... After all, the first time most kids get to
write textual material of the form

	SOMETHING = SOMETHING_ELSE
	...

is in elementary algebra (that is, until they started teaching Basic
two grades earlier than algebra... [sigh]), in which the "=" sign is
perceived as having both logical (axiomatic) and textual (macro
definition) uses. (This from talking to average kids who have been
through a year of algebra.)

Not that I'm advocating the POP-2 untyped stack model, in which
Forth-like swapping was really easy

	A, B ->A ->B

Take THAT, `lint'! :-)

-- 
"disclaimo, disclaimas, disclaimat, disclaimamus, disclaimatis, disclamant"
UUCP:      {hplabs,ihnp4,nsc,pyramid,decwrl}!sun!suneast!hinode!geoff



More information about the Comp.lang.c mailing list