Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!hpcuhb!hpcllla!hpclisp!defaria@hpclapd.HP.COM From: defaria@hpclapd.HP.COM (Andy DeFaria) Newsgroups: comp.lang.modula2 Subject: Re: Programming Questions! Message-ID: <940003@hpclapd.HP.COM> Date: 19 Sep 90 16:01:09 GMT References: Organization: Hewlett-Packard Calif. Language Lab Lines: 29 >/ hpclapd:comp.lang.modula2 / a1157@mindlink.UUCP (Reece Markowsky) / 5:45 pm Sep 16, 1990 / >Modula II is a lot like pascal in its constructs. It does, however, have >stronger typing. In pascal you have used UNITS (correct?) well in modula II, >the INTERFACE is put in what is called a DEFINITION MODULE, and the >IMPLEMENTATION is placed correspondingly in a IMPLEMENTATION MODULE. I like >this and think it better exemplifies the idea of >"information hiding".... ie... can you really say that pascal supports >information hiding when you can scroll down 10 lines to see its >implementation!!! I agree that I like Modula 2's implementation of seperate compilation better than Pascal's. Obviously this was added on to Pascal. What I've seen done to hide the IMPLEMENTATION is to contain it in include files and then not distribute the include files so you have something like: Unit FOO; Interface Const Exported_Constant = 'BAR'; Procedure FOO_BAR (Input_Parm : Integer; Output_Parm : Real); Implementation {$I INCLUDE\FOO.PAS} End.