Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!tank!mimsy!eneevax!haven!ncifcrf!nlm-mcs!adm!xadmx!joel@wsl.dec.com From: joel@wsl.dec.com Newsgroups: comp.lang.pascal Subject: Re: Pascal dying out? Message-ID: <17360@adm.BRL.MIL> Date: 26 Oct 88 02:50:51 GMT Sender: news@adm.BRL.MIL Lines: 31 A. R. Thompson has a few misconceptions about Modula-2. The language certainly has some problems, but none that he describes. First, the type WORD is imported from a machine-dependent module SYSTEM. Using WORD is therefore not portable to all other implementations, but is the right thing for the machine at hand. In particular, on a VAX the type WORD is 32 bits long. I have been convinced that structural compatibility of types is not bad in all cases, particularly if you are dealing with data structures residing on remote machines. In this case it is hard to maintain name compatibility. But in any case, Modula-2 uses name compatibility. Modula-2 allows the declaration of modules inside of procedures, but hardly anyone uses them this way. Most modules are declared as compilation units, and data declared in these modules exists for the life of the module. In most systems, this is synonymous with the life of the program, but in systems that support dynamic loading the module data may live longer. Modula-2 modules allow the definition of ``abstract data types'' in the original sense of the word. It does not support subtyping or object-oriented programming directly, though many have kludged around this by embedding procedure fields inside of records. You do give up type-safety if you want to subclass using this technique. Modula-2 is a much nicer language than Pascal, with none of the problems attributed to it by A. R. Thompsen. I can't speak for the extended Pascal proposal. - Joel McCormack