Modula-2

Bopsi ChandraMouli mouli at cavell.UUCP
Wed Feb 6 11:04:01 AEST 1985


In article <7969 at brl-tgr.ARPA> rfm <@csnet-relay.arpa, at tufts.CSNET (Richard F. Man):rfm at tufts.C writes:
>Since dan frank asked someone to read the book on modula-2 and comment on it,
>I may as well give my two cents' worth...
>1. IO in Modula-2 is terrible. It has to use different function for different
>	type of things you want to print out.

IO is not part of Modula-2 language definition. It is left to the 
implementation to decide on the IO Module. What Wirth has suggested
in his book is just one way of doing it.

>2. Import/Export violates the classical scope rule. It is exporting the name
>	of the function/procedure, not the actual function/procedure itself.

I don't think I understand what you mean by this.  The aim behind 
exporting the name of the procedure/function (along with the parameter
declarations) is for the compiler to check the type compatibility
of parameters statically. You can use the procedures/functions
without knowing what their actual implementations are.
Regarding scope,
you can achieve one more level of scope control using "local modules".

Bopsi Chandramouli.
U of Alberta.



More information about the Comp.lang.c mailing list