comp.lang.ada
 help / color / mirror / Atom feed
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: Current state of the language
Date: Fri, 24 Mar 1995 20:58:21 GMT
Date: 1995-03-24T20:58:21+00:00	[thread overview]
Message-ID: <D5yq99.CxG@inmet.camb.inmet.com> (raw)
In-Reply-To: 3ks2vu$2eo@sifon.cc.mcgill.ca

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.



  reply	other threads:[~1995-03-24 20:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3j5p3p$nc1@netnews.upenn.edu>
     [not found] ` <3k0u6r$e05@miranda.gmrc.gecm.com>
     [not found]   ` <MATT.95Mar15122202@physics2.berkeley.edu>
     [not found]     ` <3k9s2j$iq8@moon.src.honeywell.com>
     [not found]       ` <1995Mar17.092345@lglsun.epfl.ch>
1995-03-17 15:02         ` Current state of the language Kennel
1995-03-20 13:38           ` Robb Nebbe
1995-03-28 16:57             ` "types" vs "classes" (was: Re: Current state of the language) Fergus Henderson
1995-03-23 15:09 ` Current state of the language Whitney de Vries
1995-03-24 20:58   ` Tucker Taft [this message]
1995-03-27 14:54     ` Norman H. Cohen
1995-03-28 18:36       ` Kennel
1995-03-28 18:42         ` Kennel
1995-03-25 18:01   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox