[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ STL
Eric E Moore
Re: C++ STL
Mon, 24 Jun 2002 19:37:02 +0100
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2
"MaurÃcio" <address@hidden> writes:
> I've learned a little about guile, and it ocurred to me that
> porting the C++ Standard Template Library to guile could be
> interesting. We could, for instance, define several operations a
> given type of iterator or generator should supply, and then all
> algorithms (copy, merge, sort, transform etc.) using those would be
> readily available. Since guile has support for functional style, I
> think those algothims could be even more general than they are in
> C++. Has anyone tried that already?
Not the whole STL, but good chunks of it. For example we already have
a generic singly linked list type, with sort (sort), merge (merge),
copy (list-copy), transform (map) etc. operations defined on it.
Similarly we have some functions for operating on tree structures
(built as lists of lists). We have a (non-resizing) vector type,
which is less supported than the others, but at least can be sorted,
and supports a transform operation (of sorts).
The way that variable access works in scheme means that iterators and
much of the rest of the STL aren't especially needed.
It might be worth generalizing some of the functions, but most
schemers tend to use the list-based ones most of the time, which are
Eric E. Moore
Description: PGP signature
- C++ STL, Maurício, 2002/06/24
- Re: C++ STL,
Eric E Moore <=
- Re: C++ STL, Brett Viren, 2002/06/24