Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site loral.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdccs6!loral!ian From: ian@loral.UUCP Newsgroups: net.lang.mod2 Subject: Re: one pass compiler Message-ID: <452@loral.UUCP> Date: Tue, 28-Aug-84 11:39:41 EDT Article-I.D.: loral.452 Posted: Tue Aug 28 11:39:41 1984 Date-Received: Thu, 30-Aug-84 11:26:48 EDT References: <4005@tekecs.UUCP> Organization: Loral Instruments, San Diego Lines: 45 This note is in reference to the portion of Pat Clancy's article reproduced below: > Some two year old flyers I have from Volition do indeed state (in the > "fine print") that Pascal-style forward declarations are required. > I would have thought they would have fixed this by now, since this > is not really Modula-2 (in fact, I think they called it "Modula-]["). > loral!ian's assertion that it is not a problem is surprising. > First, the Pascal-style ordering requirements can be very awkward > and constraining; imposing them on Modula-2 is morally repugnant. > Second, it means that a forward declaration of an identifier may have > to be put *outside* the module in which that identifier is declared, > which certainly violates the spirit of the module syntax. The Volition Systems Modula compilers were designed to run on microcomputers, notably the Apple ][e, Apple ///, IBM PC and the Sage line of 68000 systems. Microcomputers, especially the Apple ][ and ///, have very limited resources and a one pass compiler is best for such systems. There is no way to get rid of the forward references without using a two pass compiler. If this is done, the entire symbol table must be kept for the second pass. There are two places to store the symbol table from the first pass: in memory or on disk. Until recently most microcomputers had only 64 K of RAM, so the symbol table clearly could not be contained in memory. Disk space was also very limited and disk access was slow. Storing the symbol table on flex disk would have greatly slowed the compiler and consumed an unpredictable amount of disk space. People who use minicomputers with virtual memory and fixed disk space measured in the gigabyte sometimes forget the problems faced by people designing software to run in the microcomputer environment. Given the costs incurred in this environment by a multipass compiler one should be very sure that the forward reference problem really is that much of a problem. I am a reformed Pascal programmer, so this may be why I do not find Volitions restrictions a problem. It should be noted that except for forward reference they still allow CONST, TYPE and VAR declarations to be intermixed. I can tell from Mr. Clancy's comment that imposing Pascal's declaration order restrictions on Modula is "morally repugnant" that he is a fellow language zelot. Down with the evil typeless herisy of C! Ian Kaplan ucbvax!sdccsu3!loral!ian