🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.modula2
1 messages
1 total messages Started by Robert Nagler Tue, 25 Aug 1987 22:57
Re: Is Modula-2 a One-pass language?
#3778
Author: Robert Nagler
Date: Tue, 25 Aug 1987 22:57
41 lines
2456 bytes
    >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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads