[net.lang] Assignment alignment

rwl@uvacs.UUCP (Ray Lubinsky) (08/27/85)

Kurt Guntheroth (fluke!kurt) complains that in his language, left-to-right
assignments don't line up nicely.  E.g., he shows a typical right-to-left
sequence of assignments with its left-to-right analogue:

>     a = 0
>     b = Z[i,j,k] + C[i,j,l]
>     c = -b/2ac
> 
> and now (I change only the assignment operator and direction and) look at
> 
>     0 -> z
>     Z[i,j,k] + C[i,j,l] -> b
>     -b/2ac -> c

The problem with this argument as far as I'm concerned is that my right-to-left
assignments rarely line up anyway.  I have to put in tabs to make the equal
signs fall in the same column.  E.g.,

	Bean.green      = growth(month,rain) + SUN/rain;
	Bean.haricot    = growth(month,rain) - FERTILIZER_COST;
	Bean.lima       = growth(month,rain) * Bean.haricot/100.0;

is not particularly clearer than

	growth(month,rain) + SUN/rain           -> Bean.green;
	growth(month,rain) - FERTILIZER_COST    -> Bean.haricot;
	growth(month,rain) * Bean.haricot/100.0 -> Bean.lima;

I'm not advocating this type of assignment, just saying that it's not
inherently harder to read.
-- 

Ray Lubinsky		     University of Virginia, Dept. of Computer Science
			     uucp: decvax!mcnc!ncsu!uvacs!rwl