Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utcsri!rpi!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!phage!wchang
From: wchang@cshl.org (Bill Chang)
Subject: Re: SIGNUM of teaching numerical methods
Message-ID: <1992Jul31.195136.3244@cshl.org>
Sender: news@cshl.org (NO MAIL)
Organization: Cold Spring Harbor Laboratory
Date: Fri, 31 Jul 92 19:51:36 GMT
Lines: 18

Re: syntax translation/macro preprocessing/function restriction

The problem as I see it, is reporting of compile/runtime errors. Preprocessors
are easy to write but the ones I use (C, TeX/LaTeX) are pretty terrible at 
this. Error messages are at the level of the language kernel and can bear 
no resemblance to the source code. I can see how to translate APL error 
messages back into my ASCII APL, keeping track of positions of tokens--
because the translation is reversible and very "linear". With f(...) and 
(...)T and macros the problem becomes harder. Not insurmountable ("tag the 
translation product"), but just hard enough that (most) people don't bother.
I think this is why LISP has remained lispy :-) and would guess a great deal 
of work went into Macsyma just to solve this problem.

An APL to C/Fortran compiler ought to address this too; otherwise it may become 
easier to hand-translate from scratch (what I often do) than to try to debug 
code produced by the compiler.

-- Bill Chang (wchang@cshl.org)                 Cold Spring Harbor Lab., NY
