Re: Unified Ada library

From: Georg Bauhaus (sb463ba_at_l1-hrz.uni-duisburg.de)
Date: 04/18/04


Date: Sun, 18 Apr 2004 21:58:04 +0000 (UTC)

Hyman Rosen <hyrosen@mail.com> wrote:
: Matthew Heaney wrote:
:> Right now, I'm leaning towards (1). The thing I like about Charles is
:> that it's a relatively pure port of the STL to Ada95. There are C++
:> developers who think that the STL could only have been written in C++,
:> and Charles is my argument that that claim is false.
:
: Bravo. I hope you keep going with this. You will have to watch out for the
: Ada people who hate and fear C++ and will seek to turn this library into
: something that is more "like Ada" in their perception, and will thereby kill
: it.

Could you comment on the importance of iterators and generic
algorithms in the template libraries?

I just stumbled across this in Stroustrup's Language book (sections
16.2.1-3):

"The standard library containers and iterators (often called
the STL framework ..) can be understood as an approach to gain
the best of the two traditional models described previously [*].
That wasn't the way the STL was designed, though. The STL was the
result of a single-minded search for uncompromisingly efficient
and generic algorithms.

"The aim of efficiency rules out hard-to-inline virtual functions
.... Therefore, we cannot present a standard interface to containers
or a standard iterator interface as an abstract class. Instead,
each kind of container supports a standard set of basic operations.
... Operations that cannot be efficiently implemented for all
containers are not included in the set of common operations.
 ... Each kind of container provides its own iterators that
support a standard set of iterator operations.

"The standard containers are not derived from a common base. Instead,
every container implements all of the standard container interface.
[dito for iterators]. No ... run-time type checking is involved.

 [*] Specialized Containers and Iterators, generics with type parameters
together with Iterator objects for the containers,
versus Based Containers, of a common base type, and with fat interfaces.



Relevant Pages

  • Re: Release-mode only falure when comparing STL list::iterator-s
    ... shared by iterators of all containers of this STL implementation. ... could give you real life problems only if the library should decide to ... (in the 1998 version of the standard that I ...
    (microsoft.public.vc.stl)
  • Re: OO Style with Ada Containers
    ... cursor/iterator and this is different from both STL and Java (STL ... anyway - in both cases iterators can be used to query as well as to ... algorithms work on whole containers. ...
    (comp.lang.ada)
  • Re: Which STL should I use?
    ... STL is an old name that stands for "Standard Template ... Containers and iterators. ... This part was standalone addition to STL until recently. ... providing relatively fast access to an element and addition/removal ...
    (microsoft.public.vc.language)
  • Re: diffrences between compilators
    ... |>|>| The STL is the STL is the STL. ... |>| algorithms portion of the C++ Standard Library" than it is with just "The ... | The portion of the standard C++ library concerning containers, ... Vendors like STLport, SGI, and Dinkumware offer such libraries. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: STL support for 64 bit applications
    ... Referring to STL when you mean ... It is technically correct. ... That is not in the C++ standard library. ... concepts like iterators, iterator traits, algorithms, containers, ...
    (microsoft.public.vc.stl)