From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a2124d80f1ddc0d4 X-Google-Attributes: gid103376,public X-Google-Thread: f79bb,a2124d80f1ddc0d4 X-Google-Attributes: gidf79bb,public X-Google-ArrivalTime: 1995-03-24 12:58:21 PST Newsgroups: comp.lang.ada,comp.lang.sather Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!inmet!spock!stt From: stt@spock.camb.inmet.com (Tucker Taft) Subject: Re: Current state of the language Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <3ks2vu$2eo@sifon.cc.mcgill.ca> Date: Fri, 24 Mar 1995 20:58:21 GMT Xref: nntp.gmd.de comp.lang.ada:20054 comp.lang.sather:1698 Date: 1995-03-24T20:58:21+00:00 List-Id: Whitney de Vries (whitney@christie.Meakins.McGill.CA) wrote: : Distribution: world : Robb Nebbe (nebbe@lglsun.epfl.ch) wrote: : : Another point seems to be the confusion between : : modules and types in these same languages. : What is the difference between modules and types ? The need : for type seems to disappear when one has module variables : as in K2 ( a minimal Oberon-like language ). Or conversely : the need for modules disappears when one restricts a type : to a single instance ( as in Emerald ). A module is a namespace, whereas a type is a template for objects. They can be unified, as in C++ (at least pre-namespace C++) and Eiffel, using a class construct with both per-instance variables (data members/features) and per-class variables ("static" data members or "once" features). However, when you start building big systems, you quickly find that an entity like a class is too small to represent a subsystem, and using nested classes (which is legal in newer C++'s, but not in Eiffel) is not ideal, partly because the per-instance vs. per-class distinction begins to get muddy in a set of nested classes, and because you generally want the ability to short-cut module names (the "using" clause, for example) when the hierarchies get deep. Hence, C++ has introduced namespaces to represent the larger groupings of things, and Eiffel has a module language (called "LACE" I believe) for dealing with "module"-level issues of grouping and naming. So even if you can unify them in theory, in practice, programmers of large systems need both modules and types. Languages like Ada and Modula have recognized the complementary nature of types and modules, and included robust support for both from the beginning. : -- Whitney -Tucker Taft stt@inmet.com Intermetrics, Inc.