[net.lang.apl] Readability of functions

ljdickey@watmath.UUCP (Lee Dickey) (03/31/84)

>[I'd say readability depends on your programming style.  I've found if you ]
>[use *alot* of small, simple routines, with fairly mnemonic names, plus    ]
>[one or two strategically placed comments, programs remain readable.  Does ]
>[anyone have other comments on this?                                       ]

I agree!  Some people have complained about APL being difficult to read,
but they forget that a short 4 or 5 line program in APL can be equivalent
to a 50 to 100 line program in FORTRAN or some other middle level language.

I also notice that some APL beginners (like me for instance, when I started)
tend to write in a horizontal style, thinking that it is somehow more
efficient or something.  I disagree.  I tend to write more vertically now,
with maximum number of lines around 20 to 25, because that is what fits
on a screen.

One "rule" that has helped me with this goal is the one that says:
   Make at most one assignment to a line.

-- 
  Lee Dickey, University of Waterloo.  (ljdickey@watmath.UUCP)
                      ...!allegra!watmath!ljdickey
                ...!ucbvax!decvax!watmath!ljdickey