comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Wanted: Ada STL.  Reward: Ada's Future
Date: 1999/02/04
Date: 1999-02-04T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.05.9902040928470.19316-100000@shell5.ba.best.com> (raw)
In-Reply-To: Pine.A41.3.96-heb-2.07.990204161923.93148A-100000@pluto.mscc.huji.ac.il

On Thu, 4 Feb 1999, Ehud Lamm wrote:

> On Wed, 3 Feb 1999, John English wrote:
> 
> > IMHO performance is not the problem for implementing the STL in Ada.
> [snip]
> >   This makes it hard to support arrays as "just another
> > collection type" in the way that the STL does, so you can't easily
> > define algorithms which can be applied impartially to arrays or
> > vectors or maps or whatever.

There is an obvious way to do it, and that is simply to define the array
iterator as a record with a pointer to an array and an index. This may not
satisfy John's definition of "easily", but it shows that it can be done.

Incidentally, the language Ness which was a part of the Andrew Toolkit had 
as a basic data type the "subsequence reference", which consists of a 
pointer to a string and two indices (lo and hi, say) and uses these
instead of strings. Many basic string algorithms are expressed elegantly 
in terms of operations on subsequences. Nice stuff, and easily implemented
in Ada. See http://www.cs.cmu.edu/~wjh/papers/subseq.html

> So if understand you correctly, you are also of the opinion that a simple
> port of STL may be problematic. But - the problems are not performance.
> Ok.
> 
> By the way, there is an interesting cultural/memetic phenomena here. I
> raise it since it seems that Ada fans are interested in the marketplace of
> ideas ("future"/"java" threads etc.).
> 
> If I understood the original question on this thred - it was about SOME
> libray LIKE the C++ STL for Ada. Supplying things like sets and lists. We
> started by dicussing which of these featurees are really needed, but soon
> slipped to discussing proting the STL. We somehow missed the obvious
> question which is "Can we do something better or functionally equivalent,
> but different - in Ada."

By necessity, a port of the STL to Ada will be different. C++ templates
and Ada generics are quite different, the overloading schemes are
different, etc., etc. 

In that the STL is sometimes used to effect a functional style of
programming in C++, I think Ada will look better since Ada generics take 
subprogram parameters, Ada has nested subprograms, etc., etc., 

C++ provides more syntactic sugar, allowing the overloading of array
indexing amongst others, so there is a seamlessness to the STL that 
probably won't be achieved in a "pure Ada" translation. 

What troubles me about this discussion is the notion that anything that is 
done in C++ is anathema to Ada. There is a C++ Booch Component Library, so 
therefore the Booch Components are the wrong model for any Ada library. 

> This, to my mind, show that STL won the day. It is strange, since it is
> one of the more complex libraries I saw, and most C++ programmers are
> either afraid of using it - or simply don't know how.

It's actually a fairly simple library, the problem is that many C++ compilers
still don't handle the C++ template system in its glory (;-)) so that 
many C++ programmers probably stick to a simple subset of the language. 
I expect that will change as C++ compilers mature, and the STL becomes
more popular.

-- Brian






  reply	other threads:[~1999-02-04  0:00 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-31  0:00 Wanted: Ada STL. Reward: Ada's Future Alexy V Khrabrov
1999-01-31  0:00 ` Simon Wright
1999-02-01  0:00 ` Matthew Heaney
1999-02-01  0:00   ` Alexy V Khrabrov
1999-02-01  0:00     ` Matthew Heaney
1999-02-01  0:00       ` Jeff Carter
1999-02-01  0:00 ` Brian Rogoff
1999-02-01  0:00   ` Ehud Lamm
1999-02-02  0:00     ` Pointer Arithmetic (was: Wanted: Ada STL....) adam
1999-02-02  0:00       ` William Clodius
1999-02-03  0:00         ` adam
1999-02-03  0:00           ` robert_dewar
1999-02-03  0:00             ` Jean-Pierre Rosen
1999-02-03  0:00           ` Nick Roberts
1999-02-03  0:00           ` William Clodius
1999-02-03  0:00       ` robert_dewar
1999-02-03  0:00       ` Nick Roberts
1999-02-03  0:00         ` robert_dewar
1999-02-03  0:00           ` Robert A Duff
1999-02-02  0:00     ` Wanted: Ada STL. Reward: Ada's Future Brian Rogoff
1999-02-02  0:00       ` robert_dewar
1999-02-04  0:00         ` Ehud Lamm
1999-02-03  0:00       ` John English
1999-02-03  0:00         ` Matthew Heaney
1999-02-03  0:00           ` Brian Rogoff
1999-02-04  0:00             ` Stephen Leake
1999-02-04  0:00               ` Matthew Heaney
1999-02-04  0:00               ` Brian Rogoff
1999-02-05  0:00                 ` Stephen Leake
1999-02-05  0:00                   ` Brian Rogoff
1999-02-04  0:00               ` Hyman Rosen
1999-02-05  0:00                 ` Stephen Leake
1999-02-05  0:00                   ` Hyman Rosen
1999-02-05  0:00               ` John English
1999-02-05  0:00                 ` Brian Rogoff
1999-02-06  0:00                   ` Matthew Heaney
1999-02-05  0:00                 ` Tucker Taft
1999-02-05  0:00                   ` Richard D Riehle
1999-02-05  0:00                   ` Brian Rogoff
1999-02-05  0:00           ` John English
1999-02-05  0:00           ` Nick Roberts
1999-02-04  0:00         ` Ehud Lamm
1999-02-04  0:00           ` Brian Rogoff [this message]
1999-02-05  0:00             ` Matthew Heaney
1999-02-05  0:00               ` Brian Rogoff
1999-02-08  0:00                 ` John English
1999-02-04  0:00           ` Al Christians
1999-02-04  0:00           ` Pat Rogers
1999-02-04  0:00             ` Larry Kilgallen
1999-02-04  0:00               ` Pat Rogers
1999-02-04  0:00                 ` Larry Kilgallen
1999-02-05  0:00                   ` robert_dewar
1999-02-05  0:00                     ` Tom Moran
1999-02-05  0:00                       ` dewar
1999-02-05  0:00                         ` Tom Moran
1999-02-05  0:00                           ` dewar
1999-02-05  0:00                             ` dennison
1999-02-06  0:00                               ` dewar
1999-02-08  0:00                                 ` dennison
1999-02-08  0:00                                   ` robert_dewar
1999-02-08  0:00                                     ` dennison
1999-02-09  0:00                                       ` robert_dewar
1999-02-09  0:00                                         ` dennison
1999-02-09  0:00                                     ` Nick Roberts
1999-02-07  0:00                               ` Simon Wright
1999-02-08  0:00                               ` Corey Minyard
1999-02-08  0:00                                 ` Open Source Licensing (was: Wanted: Ada STL. Reward: Ada's Future) dennison
1999-02-08  0:00                                   ` Corey Minyard
1999-02-09  0:00                                     ` robert_dewar
1999-02-09  0:00                                       ` Corey Minyard
1999-02-09  0:00                                     ` dennison
1999-02-09  0:00                                       ` Corey Minyard
1999-02-09  0:00                                 ` Wanted: Ada STL. Reward: Ada's Future robert_dewar
1999-02-09  0:00                                   ` dennison
1999-02-10  0:00                                     ` robert_dewar
1999-02-07  0:00                           ` Simon Wright
1999-02-05  0:00                     ` Larry Kilgallen
     [not found]                     ` <36ba730b.35540068@ <79fmg1$fn0$1@nnrp1.dejanews.com>
1999-02-06  0:00                       ` Larry Kilgallen
1999-02-05  0:00                 ` robert_dewar
1999-02-05  0:00               ` robert_dewar
1999-02-05  0:00                 ` Larry Kilgallen
1999-02-05  0:00                   ` robert_dewar
1999-02-05  0:00                     ` dennison
1999-02-05  0:00                       ` robert_dewar
1999-02-05  0:00                         ` dennison
1999-02-06  0:00                       ` Nick Roberts
1999-02-05  0:00                     ` Tucker Taft
     [not found]                     ` <79f24e$t14 <36BB4162.52FC6D9F@averstar.com>
1999-02-05  0:00                       ` robert_dewar
1999-02-05  0:00                       ` dennison
1999-02-05  0:00           ` John English
1999-02-09  0:00             ` micro_ada
1999-02-05  0:00         ` Nick Roberts
1999-02-08  0:00           ` John English
1999-02-02  0:00     ` Richard D Riehle
1999-02-03  0:00       ` robert_dewar
1999-02-01  0:00 ` Stanley R. Allen
1999-02-01  0:00 ` Jerry van Dijk
1999-02-01  0:00   ` Marin David Condic
1999-02-01  0:00 ` dennison
1999-02-01  0:00 ` Jeff Carter
1999-02-08  0:00   ` Michael F Brenner
1999-02-05  0:00 ` Corey Minyard
replies disabled

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