[comp.lang.modula2] Syntax to include procedures inline in procedure-based languages

ahe@k.cc.purdue.edu (Bill Wolfe) (12/09/86)

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.
>>That would allow the abstraction to still occur but would do
>>away with the overhead of calling and returning just for a few
>>lines of code.
>
>Good idea.
>			  Marty Smith

 *Bad* idea!! It is up to the *compiler* to judge whether or not to do this...
  
				  Bill Wolfe  (ahe!k.cc.purdue.edu)
				  

kdj@se-sd.UUCP (Doug Johnston x6243) (12/11/86)

The decision to include procedures inline may often be better done by compilers
but compilers often do not have all of the information necessary to make good
decisions.  The idea that compilers should play god and that they are always
better decision makers is just not true.  The ability of the programmer to
specify inline inclusion is usefull and it would be just as useful for the
programmer to be able to inhibit inline inclusion for compilers which do
such inclusions themselves.

I am a compiler developer with 10 years experience and I know that programmers
may not always make the best decisions but it is not my job to control them.
It is my job to provide the best product I can (that includes documentation) 
and to give the programmer the best set of options I that I am able to.

[My opinions are my own and may not necessarily be those of my employer.]

marty@ism780c.UUCP (Marty Smith) (12/12/86)

In article <1654@k.cc.purdue.edu> ahe@k.cc.purdue.edu.UUCP (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.
>>>That would allow the abstraction to still occur but would do
>>>away with the overhead of calling and returning just for a few
>>>lines of code.
>>
>>Good idea.
>>			  Marty Smith
>
> *Bad* idea!! It is up to the *compiler* to judge whether or not to do this...
>  
How does the compiler know what I want unless there is a way I can tell the
compiler what I want?  Some people take this artificial intelligence thing
a little too far?
					  Marty Smith