Newsgroups: comp.lang.apl
Path: watmath!watserv1!70530.1226@compuserve.com
From: Mike Kent <70530.1226@CompuServe.COM>
Subject: Re Which language ... fewest lines
Message-ID: <920501221600_70530.1226_CHC111-1@CompuServe.COM>
Sender: root@watserv1.waterloo.edu (Operator)
Organization: University of Waterloo
Date: Fri, 1 May 1992 22:16:01 GMT
Lines: 22

If the question is so silly, why do we in the APL community so often
mention brevity as one of APL's key advantages over scalar-oriented
languages?  Even though the answer is "it depends", the question is 
_not_ silly.

It is not silly because, other things being roughly equal, the effort
required to maintain a piece of code grows faster than linearly with
the number of statements. (or tokens, or whatever you use to measure
length).  The usual guess is that the effort grows about linearly with
the number of statement pairs (a rough measure of the number of potential
interactions), which means quadratically with the length of the code.  I
have just spent the entire month of April adding what should have been a
trivial enhancement to a 600-statement APL program, and while the length
of the of the main function was not the only, or even the main, problem,
it contributed enough to the difficulties that I finally bit the bullet
and carved the long routine into about 20 subroutines (with a few _more_
statements overall) so that I could start identifying and and working
through the real difficulties.  If I'd been faced with 6 to 10 times as
much C code, or whatever, I'd be a gibbering idiot already, and no
progress would have been made.


