comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Why is it Called a Package?
Date: 2000/03/27
Date: 2000-03-27T00:00:00+00:00	[thread overview]
Message-ID: <wcczorkfemx.fsf@world.std.com> (raw)
In-Reply-To: 2000Mar27.111655.1@eisner

kilgallen@eisner.decus.org (Larry Kilgallen) writes:

> In article <38DF7F38.8D656ABD@lmtas.lmco.com>, Gary Scott <Gary.L.Scott@lmtas.lmco.com> writes:
> > Admittedly a "fluff" question...
> > 
> > I notice that a lot of modern languages choose names/syntax that I
> > personally do not find intuitive.  Other languages contain basically the
> > same feature but call it by different names (module, etc.).  Why was
> > "package" considered the intuitive name for this feature?

Well, a package in real life is a thing that contains a collection of
other things, all wrapped up together, which is sort of like what an Ada
package is.

Anyway, programming language design is too immature to have a standard
terminology.  You can't blame Ada for choosing "package" any more than
you can blame some other language for using "module" or "cluster".
They're all pretty reasonable names, IMHO.

> I was not there when the decision was made, but I would presume the
> goal was to _avoid_ using a familiar name since other languages do
> not typically have something that behaves in this fashion.  If one
> were to propose the term "module", for instance, those who knew
> other programming languages and were learning Ada might presume
> that it worked like a "module" in those other languages, and they
> would be wrong.
> 
> I program in several languages that have "modules" and those "modules"
> do not support separately compiled specifications and bodies, cannot
> be nested within other "modules", etc.

I wasn't there either, but I doubt if that was the goal, and I don't
think it *should* be the goal.  First of all, Ada's packages are pretty
much like Modula-2 modules (which by the way *can* be nested and *can*
have separate spec/body).  Even in languages that don't allow those
things, the concept is close enough that it would not be confusing to
have the same name.

Ada's procedures don't work exactly like Pascal's procedures, either.
For example parameter passing is completely different.  But the two
things serve the same basic purpose, so it makes sense to call them by
the same name.  Too bad other languages call them "functions" or "void
functions" or "methods" or "subroutines".

By the way, I'm told (by Robert Dewar, I think) that it *was* a goal of
Ada 83 to avoid the term "pointer" -- hence the term "access type", to
distinguish between Ada's pointers (relatively type safe) and the kinds
of pointers found in (eg) C.  I don't like that idea -- Ada's pointers,
although different from C's, serve something of the same purpose --
enough to call them by the same name.  Anyway, Ada is based on Pascal,
not C, and Pascal's pointers are just like Ada-83's.  Calling them
"accesses" serves only to confuse newcomers.

- Bob




  reply	other threads:[~2000-03-27  0:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-27  0:00 Why is it Called a Package? Gary Scott
2000-03-27  0:00 ` Ted Dennison
2000-03-27  0:00 ` Nick Roberts
2000-03-27  0:00   ` Robert A Duff
2000-03-29  0:00     ` Florian Weimer
2000-03-29  0:00       ` Robert A Duff
2000-03-30  0:00         ` Geoff Bull
2000-03-30  0:00           ` Robert A Duff
2000-03-30  0:00             ` Jean-Marc Bourguet
2000-03-30  0:00               ` David Starner
2000-04-03  0:00               ` Robert A Duff
2000-04-06  0:00             ` Brian Rogoff
2000-04-07  0:00               ` Robert Dewar
2000-04-07  0:00                 ` Brian Rogoff
2000-04-07  0:00                   ` Hyman Rosen
2000-04-07  0:00                     ` Brian Rogoff
2000-04-12  0:00                 ` Comment from the trenchs Robert Brantley
2000-04-13  0:00                   ` Jeff Carter
2000-04-17  0:00                     ` Robert Brantley
2000-04-07  0:00               ` Why is it Called a Package? Robert A Duff
2000-04-07  0:00                 ` Brian Rogoff
2000-04-07  0:00                   ` Robert A Duff
2000-04-08  0:00                     ` Brian Rogoff
2000-04-07  0:00               ` Pascal Obry
2000-04-07  0:00                 ` Samuel T. Harris
2000-04-07  0:00                   ` Richard D Riehle
2000-04-08  0:00                     ` Florian Weimer
2000-04-09  0:00                       ` Stefan Skoglund
2000-04-07  0:00                   ` Brian Rogoff
2000-04-08  0:00                     ` Robert A Duff
2000-04-07  0:00                   ` Stanley R. Allen
2000-04-07  0:00                 ` Paul Graham
2000-03-28  0:00   ` Ken Garlington
2000-03-28  0:00   ` Jean-Marc Bourguet
2000-03-28  0:00     ` Robert A Duff
2000-03-30  0:00     ` Alfred Hilscher
2000-03-31  0:00       ` Anders Wirzenius
2000-03-29  0:00   ` Florian Weimer
2000-03-27  0:00 ` Larry Kilgallen
2000-03-27  0:00   ` Robert A Duff [this message]
2000-03-28  0:00     ` Gary Scott
replies disabled

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