Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!linus!decvax!decwrl!dec-rhea!dec-orphan!blickstein From: blickstein@orphan.DEC (Dave Blickstein) Newsgroups: net.lang Subject: APL myths Message-ID: <1982@decwrl.UUCP> Date: Mon, 25-Jun-84 10:20:30 EDT Article-I.D.: decwrl.1982 Posted: Mon Jun 25 10:20:30 1984 Date-Received: Tue, 26-Jun-84 06:20:22 EDT Organization: DEC Engineering Network Lines: 61 >I have used both FORTRAN and APL (among many other languages) and I >came to the conclusion that APL is the world's only write-only >language! The standard technique for fixing a bug in an APL program is >to rewrite the whole program ... FINDING the bug in an APL program is >much more difficult than in any other language I have used. By the >way, has anyone ever found a way to write structured APL? > > Rich Strebendt I'm so tired of statements like this. APL is not unreadable. In fact, I personally find it more readable than FORGOL (my acronym for all the various FORTRAN dialects: Pascal, ada, PL/I, C, etc.) First of all, your opinion of APL is probably derived from the basic fact that APL is different from procedural languages (FORGOL). You probably find it hard to understand all those symbols. But saying that it's unreadable is like an american saying that Japaneese is unreadable. It's only unreadable if you don't understand the symbols. I'm afraid that you've betrayed your lack of knowlege of APL by asking for a way to write structured APL (saying that you've used it, is different than saying that you understand it). One of the best elements of APL is that it attempts to substitute powerful notation for procedural specification (structured programming is a concept of procedural languages which APL tries NOT to be). In other words, SP concepts aren't as necessary in APL because the vast majority of loops and things, are eliminated because of APLs powerful set of functions and operators. Another reason why I find APL more readable is its terseness. One short APL expression (average) could be several lines (or pages) of FORGOL: DCL I integer; dcl sum integer; sum = 0; do i = 1 to length(vector) sum = sum + vector(i); end; print sum/length(vector); as opposed to the APL definition (written here in ascii-ized form): (+/ VECTOR) % rho VECTOR (where rho is the greek letter rho which is the APL "shape" (length) function and % is the mathmatical divide symbol - overstruck with :). I guarantee you, an APL programmer will identify the APL version much faster than the FORGOL programmer can identify the FORGOL version everytime. The APL representation is just the definition of average. The FORGOL program is the algorithm and has all kinds of superfluous confusing things like the sum and index variables and the DO loop. This is an admittedly simple example, but it applies in the general context. Dave Blickstein (UUCP) {decvax, ucbvax, allegra}!decwrl!rhea!orphan!blickstein (ARPA) decwrl!rhea!orphan!blickstein@Berkeley decwrl!rhea!orphan!blickstein@SU-Shasta