Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!hp4nl!philapd!ssp1!dolf From: dolf@idca.tds.PHILIPS.nl (Dolf Grunbauer) Newsgroups: comp.lang.c Subject: Re: Right-to-left (was: Re: entry at other than main) Keywords: APL Message-ID: <233@ssp1.idca.tds.philips.nl> Date: 29 Aug 89 10:37:32 GMT References: <19173@mimsy.UUCP> <207600032@s.cs.uiuc.edu> <19218@mimsy.UUCP> <230@ssp1.idca.tds.philips.nl> <9828@alice.UUCP> Organization: Philips Telecommunication and Data Systems, The Netherlands Lines: 34 In article <9828@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: >In article <230@ssp1.idca.tds.philips.nl>, dolf@idca.tds.PHILIPS.nl (Dolf Grunbauer) writes: >> Another interresting thing of APL is that it is impossible to write a >> compiler for APL, and that is why there are only interpreters for APL. >Not true. There are compilers for APL. Hewlett-Packard had >a very impressive one a dozen or so years ago. > --Andrew Koenig > ark@europa.att.com I think it is possible to have some sort of a precompiler for APL, which does syntax and semantic checks for most functions basically to speed up the actual interpretation. I expect APL works like this. But, as it is possible in APL to build text strings and execute them as APL code, you will need to compile (or interpret) this string at runtime. The same thing applies to input, as input for APL can be the result of an APL statement, including using the global variables. In this case the input has to be compiled and executed (like in: "RHO n" to get an array). This means that during runtime of an APL program, you will still need the compiler/interpreter of APL. This is different from languages like C, where you can (for example :-) throw your compiler away and your compiled program still works. When you do this with your APL compiler, probably most of the APL programs will work, but not all. This is why I think (an to be true: was told) it is not possible to have an APL compiler, in the sence of a C or FORTRAN compiler. I think Henry Spencer meant this problem when he wrote: > There are some quite impressive APL compilers, actually. As with many > such languages, the interpreter has to be around in the general case, > but most real programs can be compiled quite satisfactorily. A really > aggressive compiler can even produce something quite efficient. -- Dolf Grunbauer Tel: +31 55 432764 Internet dolf@idca.tds.philips.nl Philips Telecommunication and Data Systems UUCP ....!mcvax!philapd!dolf Dept. SSP, P.O. Box 245, 7300 AE Apeldoorn, The Netherlands