From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eric E Moore Newsgroups: gmane.lisp.guile.user Subject: Re: C++ STL Date: Mon, 24 Jun 2002 19:37:02 +0100 Sender: guile-user-admin@gnu.org Message-ID: <87elewcylt.fsf@dyn006239.shef.ac.uk> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: main.gmane.org 1024943997 6453 127.0.0.1 (24 Jun 2002 18:39:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Jun 2002 18:39:57 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17MYkn-0001fy-00 for ; Mon, 24 Jun 2002 20:39:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17MYk9-0006J5-00; Mon, 24 Jun 2002 14:39:17 -0400 Original-Received: from dyn006239.shef.ac.uk ([143.167.6.239]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17MYi2-0006Af-00 for ; Mon, 24 Jun 2002 14:37:06 -0400 Original-Received: by dyn006239.shef.ac.uk (Postfix, from userid 1000) id 20702717F; Mon, 24 Jun 2002 19:37:06 +0100 (BST) Original-To: guile-user@gnu.org In-Reply-To: =?iso-8859-1?q?("Maur=EDcio"'s?= message of "Mon, 24 Jun 2002 13:27:39 -0300") Original-Lines: 31 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:635 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:635 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable "Maur=EDcio" writes: > Hi, > > 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 quite good. =2D-=20 Eric E. Moore --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9F2bS40OczkogoRERAiK7AJ9rqXwGZb7zt412+TGMJLWmIs865QCgnVaL Z95mE04YMnY4Z+hrG72QsHk= =xmiP -----END PGP MESSAGE----- --=-=-=-- _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user