Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site uvacs.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!mhuxt!mhuxr!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!ncsu!uvacs!rwl From: rwl@uvacs.UUCP (Ray Lubinsky) Newsgroups: net.lang Subject: Assignment alignment Message-ID: <2318@uvacs.UUCP> Date: Tue, 27-Aug-85 10:22:41 EDT Article-I.D.: uvacs.2318 Posted: Tue Aug 27 10:22:41 1985 Date-Received: Thu, 5-Sep-85 11:03:22 EDT References: <6571@boring.UUCP> <891@vax2.fluke.UUCP> Organization: U.Va. CS in Charlottesville VA Lines: 34 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