comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <mark@rational.com>
Subject: Re: OO and modules ( was Which book for ADA beginner ?)
Date: Fri, 2 Feb 2001 14:07:49 -0800
Date: 2001-02-02T14:07:49-08:00	[thread overview]
Message-ID: <95fbj5$nen$10@usenet.rational.com> (raw)
In-Reply-To: 3A759385.6BDA29D8@worldnet.att.net


James Rogers <jimmaureenrogers@worldnet.att.net> wrote in message
news:3A759385.6BDA29D8@worldnet.att.net...
> [...]
> C++ has added a new feature called name spaces to allow the
> use and identification of multiple classes with the same name in
> single program. This feature was added because the original concept
> of all encapsulation occurring only in the class was found to be
> too limiting, particularly when trying to use pre-defined libraries.

The result is that C++ has three different modularity constructs:

1) From C, the file.  File-based scoping along with extern declarations are
the basis for the ".h/.C" convention.  Direct textual inclusion of header
files with the problems that attend to that approach.  No semantic
relationship between the header file and the "implementation file" (i.e. it
is legal C/C++ for the implementation file to not fulfill all the
protoptypes as declared in the header file.  You will get a link error if
all the symbol references are not satisfied somehow).

2) Classes

3) Namespaces

So you have these three things that kind of overlap and don't seem to
complement
each other particularly well.  I don't like it that namespaces can be
textually extended, which means that they don't mean the same thing in all
places.

The main thing to remember is that C++, like C, is still a linker-based
language.

-- mark









  reply	other threads:[~2001-02-02 22:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3A71400E.32057C6B@becker.k.pl>
2001-01-26 15:16 ` Which book for ADA beginner ? Jerry Petrey
2001-01-26 15:42 ` BSCrawford
     [not found] ` <slrn972q4p.k7.randhol+abuse@kiuk0156.chembio.ntnu.no>
2001-01-26 16:52   ` Brian Rogoff
2001-01-26 17:06     ` Preben Randhol
2001-01-27  2:15     ` Andrzej Lewandowski
2001-01-28 13:43       ` Preben Randhol
2001-01-28 18:29         ` Brian Rogoff
2001-01-29  2:28           ` Andrzej Lewandowski
2001-01-29 14:03             ` OO and modules ( was Which book for ADA beginner ?) Hans-Olof Danielsson
2001-01-29 15:58               ` James Rogers
2001-02-02 22:07                 ` Mark Lundquist [this message]
2001-02-02 22:06               ` Mark Lundquist
2001-01-29 17:46             ` Which book for ADA beginner ? Brian Rogoff
2001-02-02 20:11             ` Mark Lundquist
2001-02-02 21:58           ` Mark Lundquist
2001-01-28 16:21 ` squeaker
2001-02-02 22:13 OO and modules ( was Which book for ADA beginner ?) Mark Lundquist
replies disabled

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