Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sri-spam!ames!ucbcad!ucbvax!olsen.UUCP!nagler From: nagler@olsen.UUCP (Robert Nagler) Newsgroups: comp.lang.modula2 Subject: Re: Is Modula-2 a One-pass language? Message-ID: <8708252010.AA00419@klaus.olsen.uucp> Date: Tue, 25-Aug-87 18:57:44 EDT Article-I.D.: klaus.8708252010.AA00419 Posted: Tue Aug 25 18:57:44 1987 Date-Received: Thu, 27-Aug-87 02:53:49 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 41 >I sent a message on 22nd July to info-modula-2 about one-pass compilation. >I was surprised to receive only three replies (from Chuck Bilbe, I think Randy mentioned a minor problem in receiving replies, because your mail address didn't work. I tried sending a reply directly to you, but it bounced and I just gave up. In answer to the question posed: >I would be interested to hear of any other difficulties that a one-pass >compiler would have in compiling the language defined by the Report. I would first like to change the system to a guilty until proven innocent version as follows: Why do we need to remove the loose declaration order of Modula-2? The answers to this question are: 1) The compiler will go faster. 2) "Use before declaration is an abomination" -- Randy Bush. In response to answer (1), I would like ask how much faster the compiler will go in comparison to the average compilation/link sequence of a typical M2 program. My initial impression would be 10 to 20% faster, but then I am not a compiler writer. The speed improvement on a 10 second compile doesn't seem worth it in comparison to the amount of time it takes a programmmer to verify that a module will be fed into the compiler in the "correct" order. Answer (2) is an interesting opinion which Dr. Wirth allowed us to explore. After using C and Pascal, I find the loose order of declaration in M2 allows the programmer to put the important concepts at the top of the module where they are seen first. I wonder if (2) is more applicable to systems which require programmers to use cross-referenced listings as opposed to ones which supply multi-window text editors. In any event, I do request that the question be rephrased to account for the large body of Modula-2 code which may or may not follow this upward-incompatible restriction. Rob