From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: STL, Ada, C++ (Was Re: The Next Microsoft?)
Date: 2000/05/07
Date: 2000-05-07T00:00:00+00:00 [thread overview]
Message-ID: <Pine.BSF.4.21.0005071606250.9268-100000@shell5.ba.best.com> (raw)
In-Reply-To: 39133213.64A@Ganymede.com
On Fri, 5 May 2000, Bill Greene wrote:
> Hyman Rosen wrote:
> >
> > ...
> > Ada has nothing like it [STL], since it is missing automatic instantiation
> > of generics.
>
> Ada must have something like it, since Stepanov ported STL from Ada to
> C++.
There are Ada versions of STL-like libraries, where "-like" means that
the libraries are based on active iterators defined over sequential
containers with algorithms parameterized in terms of those iterators, and
hence independent of the particular type of container. It happens that
operations of C pointer arithmetic and random access map well to the
traversal of sequential data structures and so you get a nice syntactic
dovetailing in the C++ STL with this part of generic programming. Clearly
non-sequential collections can't be handled this way. I don't think Ada's
functional syntax for ++, --, etc is a fundamental problem.
I agree that the lack of automatic instantiation is a weakness of Ada
generics vis-a-vis C++ templates. There are other places where that
facility would come in handy besides STL style generic programming. I
don't think their absence is fundamental, but I suppose that is debatable.
Ada has subprogram nesting and allows you to instantiate generics with
local functions and overloading on return type. So generic programming is
different in Ada, less powerful in some ways, due to the lack of automatic
instantiation, more powerful in others.
I think that the STL is well designed, and has certainly influenced the
design of C++ in a good way. If anything, I wish templates and the STL had
been in the language earlier, and the OO part had come later.
-- Brian
next prev parent reply other threads:[~2000-05-07 0:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8eg37k$15n$1@nnrp1.deja.com>
[not found] ` <8epkoa$b8b$1@nnrp1.deja.com>
[not found] ` <E$OcUgAHHIE5Ewfl@quik.freeuk.net>
[not found] ` <8eu0ob$7qv$1@nnrp1.deja.com>
2000-05-05 0:00 ` The Next Microsoft? Ray Blaak
2000-05-05 0:00 ` Mark Atwood
2000-05-05 0:00 ` Ayende Rahien
2000-05-05 0:00 ` Hyman Rosen
2000-05-05 0:00 ` Mark Atwood
2000-05-05 0:00 ` Hyman Rosen
2000-05-05 0:00 ` Jon S Anthony
2000-05-05 0:00 ` Hyman Rosen
2000-05-05 0:00 ` Jon S Anthony
2000-05-05 0:00 ` Bill Greene
2000-05-06 0:00 ` Ehud Lamm
2000-05-07 0:00 ` Brian Rogoff [this message]
2000-05-08 0:00 ` STL, Ada, C++ (Was Re: The Next Microsoft?) Robert Dewar
2000-05-07 0:00 ` Brian Rogoff
2000-05-08 0:00 ` Hyman Rosen
2000-05-08 0:00 ` Brian Rogoff
2000-05-09 0:00 ` Richard D Riehle
2000-05-09 0:00 ` Brian Rogoff
2000-05-09 0:00 ` Hyman Rosen
2000-05-09 0:00 ` Robert A Duff
2000-05-09 0:00 ` Hyman Rosen
2000-05-09 0:00 ` Brian Rogoff
2000-05-10 0:00 ` Richard D Riehle
2000-05-10 0:00 ` Brian Rogoff
2000-05-08 0:00 ` Pascal Obry
2000-05-08 0:00 ` Brian Rogoff
2000-05-08 0:00 ` Robert Dewar
2000-05-08 0:00 ` Pascal Obry
2000-05-09 0:00 ` STL, Ada, C++ Harry Erwin
2000-05-09 0:00 ` Robert A Duff
2000-05-09 0:00 ` STL, Ada, C++ (Was Re: The Next Microsoft?) Marin D. Condic
2000-05-09 0:00 ` Robert Dewar
2000-05-09 0:00 ` Marin D. Condic
2000-05-08 0:00 ` Florian Weimer
2000-05-05 0:00 ` The Next Microsoft? Bobby D. Bryant
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox