Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!sei.cmu.edu!firth
From: firth@sei.cmu.edu (Robert Firth)
Newsgroups: comp.lang.modula2
Subject: Re: Modula-2 standard
Message-ID: <485@aw.sei.cmu.edu.sei.cmu.edu>
Date: Mon, 15-Dec-86 09:51:49 EST
Article-I.D.: aw.485
Posted: Mon Dec 15 09:51:49 1986
Date-Received: Tue, 16-Dec-86 20:52:26 EST
References: <11458@cca.UUCP> <307@bms-at.UUCP> <475@aw.sei.cmu.edu.sei.cmu.edu> <1656@k.cc.purdue.edu>
Sender: netnews@sei.cmu.edu
Reply-To: firth@bd.sei.cmu.edu.UUCP (PUT YOUR NAME HERE)
Organization: Carnegie-Mellon University, SEI, Pgh, Pa
Lines: 48

In article <1656@k.cc.purdue.edu> ahe@k.cc.purdue.edu (Bill Wolfe) writes:
>In article <4814@ism780c.UUCP> marty@ism780c.UUCP (Marty Smith) writes:
>>In article <11458@cca.UUCP> bills@cca.UUCP (Bill Stackhouse) writes:
>>>
>>>Something I would like to see in all procedure based languages
>>>is some syntax in the procedure def. that indicates that the
>			^^^^^^^^^
>>>procedure is to be included inline at all places it is called.
>
>In article <475@aw.sei.cmu.edu.sei.cmu.edu>, firth@sei.cmu.edu.UUCP writes:
>> Let me agree at once with Stuart and others that a "good" compiler
>> should automatically expand procedures inline where appropriate.
>> 
>> However, I think some pragma or hint is needed to tell most
>> compilers where this is indeed appropriate.  Suppose, for instance,
>> that a DEFINITION module contains a procedure definition, and the
>> IMPLEMENTATION module contains the body.  If the procedure is
>> compiled as true out-of-line code, then you can replace the
>> implementation (body) without recompiling dependents. [...]
>
>   The original article referenced *procedures* and not modules.
>   Furthermore, in the case of a module, the compiler has NO CHOICE but to
>   generate out-of-line code; the separateness must be maintained.
>   

And I was talking about procedures defined in modules.  In M2, ALL
procedures are defined in modules, so we are talking about the same thing.

The Modula-2 Report [third edition, Ch 14] requires only that modules be
separately compiled, it does not require that an implementation module be
REcompilable without visible effect.  This is mentioned in the user
manual merely as one possible feature of a "sophisticated" Modula compiler.

>In article <475@aw.sei.cmu.edu.sei.cmu.edu>, firth@sei.cmu.edu.UUCP writes:
>> But here I'd state my personal preference for more intelligent
>> compilers.  In general, the user should give the compiler any
>> information it CANNOT find out for itself, and no other
>> information.
>
>   The compiler already has all the information it needs.  When one
>   specifies "module", the compiler can, should, and will take this 
>   as a clear indication that the code is *not* to be expanded in-line.
>   
>						  Bill Wolfe
>				       

Such a compiler would be wrong.  It really does help to read the language
definition, you know.