wdr@wang.com (William Ricker) (06/25/91)
[ I suggest we Follow-up-to: alt.folklore.computers; this is getting afield] rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) writes: >The write-only code issue is NOT a language issue nearly so much as it >is an issue of attitude and adherence to principles of maintenance. I'll agree with that. To a large degree, readability is a matter of discipline in the code's author (& manager & architects). I've written unreadable code in many lanugages and readable code in as many -- the same ones. It depends on attitude and taking the time to do it right the first time, because code you think you'll throw away you won't be allowed to, or later wish you hadn't. To call a language write-only because the non-writers can't read the code of the users is parochial; To call a language write-only because writers without style can't read their own code is to inadequately share the blame. The author and designer of code should always, no matter whether in Knuth's WEB or an APL workspace, plan the presentation of their code and comments, or rather, of their comments and code. We can blame a generation with lousy penmanship and arithmetic skills on Bic Ballpoints, Smith-Corona portable electric typers, and TI calculators, or we can blame an attitude of quick and shoddy is good enough. Certainly in the spirit of Don Norman's /Psychology[Design] of Everyday Things/, [s]he who designs a hard-to-use tool deserves as much blame as [s]he who [ab]uses it. Designers of languages *or* the frontend utilities (like editors & compilers) should consider readability and writablitity, and be graded on same. But if it's trivial to write emacs macros that get the syntax right for you, is it fair to criticize that it's hard to type all the {}; or ((( ))) ?? COBOL and C are both civilized languages when you have the right tools; colleges with Survey Of Languages courses don't usually have a Screens Generator and a Data Dictionary to go with the Cobol compiler for the one COBOL assignement. I wish I had SABRE-C's C editor. I'll also note that most criticism of languages by those not using them regularly are usually based on the seminal documentation; no program written lately in a language calling itself PASCAL or anything listed above would compile with academic release one of the language of same name; all the recent usable releases have practical & theoretical extensions that make them usable. Like loops & if-then- -else in APL, LISP, FORTRAN, COBOL; standardized I/O in Pascal; Data Dictionaries to write the boilerplate COBOL automagically, etc. I've seen incredibly legible APL, FORTH, & LISP, when the programmers raised the level of the extensible language into the problem domain; I've also seen APL, FORTH, and LISP that was as proudly obscure as anything in the Obfuscated C Contest -- and C almost as bad in products. APL got a bad wrap from the educational game of "one liners", in which one competes to invent obscure abuses to do an arbitrary task in 80 chars or fewer, or having done so, challeges colleagues to decipher same without benefit of comments or sensible variable names. This is actually an interesting exercise for learning the powerful operators inside & out -- which wouldn't occur in a language less rich in operators -- but was (a) the common stereotype of APL hackers, and (b) adopted by too many folk as the True APL Style. Large APL shops operated by Boeing, STSC, (and I assume Sharpe) etc gravitated toward a more maintainable style rapidly; Rose's books document this. I've written both readable and unreadable code in most of the so-called Write Only langauges, including several not mentioned here. My list of Write Only Languages (and which version I used) APL 370,5110,J Assembler 370,PDP11,MASM BASIC EduSystem-8,-11 C Unix PWB,7,III,V.*,4.*,MS5.10 COBOL + TOPS-10 FORTH MMS on TRS-80 FORTRAN-II,IV EduSystem-11/L (II); IBM G,H; TOPS-10; Pr1me [57]50 LISP (before SCHEME) Franz SNOBOL * ** TECO macros ++ TOPS-10 *** * begat Icon, alegedly readable, which begat Pearl. (I fear if I looked at Pearl I might decide it was WO also, and then I'd have missed two.) I've heard a deck of blank cards attacked by a lunatic with an icepick would have been a valid Snobol program which would produce output; I'm not sure if this is true, but ... ** only one I've Missed *** heard of a fellow at same site who implemented bubble-sort in TECO. I used TECO macros as equivalent of AWK/SED/TR command pipes. + I've written so few lines of COBOL, I think all 3 lines were readable. ++ I doubt I wrote any readable TECO macros! But RMS's mock-lisp for the TECO-implementation of Emacs would count as having seen some. Flames to /dev/null, historical oriented followups to alt.folklore.computers, please. --- bill [gee, am I getting to be as old as this sounds? ack! ] -- /s/ Bill Ricker wdr@wang.wang.com "The Freedom of the Press belongs to those who own one." *** Warning: This account is not authorized to express opinions. ***