SULLIVAN@suny-bing.CSNET (05/07/87)
John Sangster asks why Action! compiles so quickly. I'm not sure there is a simple answer, but I'll give it a shot. 1. Everything, including compiler and source, is typically in memory rather than on disk. Also, the compiled code is loaded directly into memory. The lack of disk access makes a HUGE speed difference. I don't have a ramdisk, so I really notice this. Rumor has it that Ace C compiles quickly with a ramdisk, but I haven't tried this. 2. Action! is a very minimal language. The following (and, of course, more) don't exist in Action! a. sophisticated data types, e.g. floating point numbers, multi- dimensional arrays, files, arrays of records, arrays as fields of records, recursively defined types, ... b. recursion c. strong type checking -- card can often be used interchangeably with pointer types, for example d. parameter passing by reference -- also true of C, of course e. dynamic storage allocation -- ok, strictly speaking this is true of C, but almost all C's (except those that run on Atari's) have this available as an external procedure. sure, sure, I can write one in Action. f. good error messages. Although the language is so small, it is usuall easy to find the syntax error g. macros -- with parameters h. conveniently usable functions -- the most annoying thing about Action! to me (if anyone from OSS reads this - take note - I really really really hate this) is that function values cannot be used in expressions. Of course, all of the above except b. and h. also apply to the C's which are available on Atari machines. In addition, the C compilers don't produce 6502 code. They produce a sort of P-code which is interpreted at run-time. Thus execution speeds suffer. 3. OSS, or whoever wrote it, did a good job. I have my gripes, but compared to other languages available, I can't complain too much. On the other hand, I still regard Action! as a "toy language". I would hate to have to produce software professionally using this compiler, or any other on Atari machines. The mental comparison I keep making is with Turbo Pascal. Note -- I am not an IBM PC advocate. I only touch them when I'm forced to. Turbo Pascal is similar to Action! in speed, convenience (built-in editor, etc),and size of machine (it runs in 64K) but it is a full Pascal implementation. A query - (I've asked before, but no-one answered): How is Kyan Pascal. How fast? How many bugs? Is it a full implementation? Fred Sullivan Dept. Math. Sci. SUNY @ Binghamton sullivan @ suny-bing