Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utnut!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!news-feed-1.peachnet.edu!umn.edu!csus.edu!sfsuvax1.sfsu.edu!vpcsc4
From: vpcsc4@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: Question: Tri-diagonal matrices in APL
Message-ID: <1993May1.064356.24872@csus.edu>
Sender: news@csus.edu
Organization: San Francisco State University
References: <27APR93.10680596.0076@UNBVM1.CSD.UNB.CA> <1684@kepler1.rentec.com>
Date: Sat, 1 May 1993 06:43:56 GMT
Lines: 60



In article (Andrew Mullhaupt) writes:
>
>1. Figure out how to call LAPACK.  Tridiagonal matrices (especially the
>symmetric one you posted) are old friends to traditional numerical
>analysis and without doubt your best results will be using the known
>packages. If your APL can't call out, get one that can.
>
 Kind of like taking a sledgehammer to swat a fly isn't it?

>2. As a last resort, or if you really only have a tiny problem, use APL.

 As Jim Backus pointed out in his 1979 paper on functional programming,
 FORTRAN is too word-at-a-time. FORTRAN's low level requires that
 the programmer be preoccupied with parameters in his control structures
 which do no relate to solving his problem.  FORTRAN does not support 
 arrays of arrays or have keyed files (do you know of any popular DBMS
 application implemented in FORTRAN with an active market life?). Unlike 
 APL, FORTRAN has clumsy dynamic memory allocation and a clumsy re-
 presentation of complex numbers. So, while FORTRAN is the leader when 
 it comes to execution time, for ease of programming APL is the way to go.
 And when low level applications must be written many people prefer C, 
 because it is portable and has many features, say pointers, which 
 FORTRAN does not have.  Also, if you are looking for a package which will
 provide a nice front end for your application, say with combo boxes on the 
 PC, even ISI's $34 APL or J beat most FORTRAN implementations hands 
 down. And Manugistic's APL is pretty much the state of the art when it
 comes to this kind of thing. As for graphics, on the PC, you can call
 EXCELL from almost every APL. Finally, since APL is interactive and parallel 
 in nature, the process of thinking in the language often provides a
 programmer with additional insight into a problem. 

 Large applications involving FORTRAN can easily get into the 10's of
 thousands of lines of code.  APL is much more concise, so well 
 written APL easier to maintain than well written FORTRAN. However,
 poorly written APL code is more difficult to maintain  and a poorly
 written application can often be rewritten in the time it can
 be debugged. (I can relate to a recent poster who complained that APL2
 was disparaged at some firms because the graphics utilities for the
 I/O hundreds of functions can badly clutter things up.) Also, it is
 true that APL could benefit from more control structures.  This
 state of things is expected to change.

 FORTRAN is a great language if you are looking for a language
 with proven publically available numerical libraries. It has a
 strong following in the super computing industry (what's left
 of it).  It is a very common programming language so there are probably
 more job opportunites for FORTRAN programmers than APL programmers.
 And I would agree that everyone should know how to program in it.
 

 A version of J with a LAPACK interface which might bridge these
 worlds would be nice.

 It is worth noting that every language has it's strong
 points and its weak points. Increasingly the computing world
 is becoming multilingual. Just like California.

 Emmett
