From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA17429; Wed, 14 Aug 2002 17:43:32 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA17371 for ; Wed, 14 Aug 2002 17:43:31 +0200 (MET DST) Received: from bastion.artisan.com (bastion.artisan.com [209.144.161.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g7EFhT504689 for ; Wed, 14 Aug 2002 17:43:30 +0200 (MET DST) Received: from ypmaster.artisan.com (ypmaster [172.16.2.1]) by bastion.artisan.com (8.9.2/8.9.2) with ESMTP id IAA11896; Wed, 14 Aug 2002 08:43:24 -0700 (PDT) Received: from granite.artisan.com (granite [172.16.10.97]) by ypmaster.artisan.com (8.9.2/8.9.2-arti) with ESMTP id IAA05739; Wed, 14 Aug 2002 08:43:22 -0700 (PDT) Received: (from bpr@localhost) by granite.artisan.com (8.9.2/8.9.2) id IAA05803; Wed, 14 Aug 2002 08:43:22 -0700 (PDT) X-Authentication-Warning: granite.artisan.com: bpr set sender to bpr@artisan.com using -f From: Brian Rogoff MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <15706.31385.247539.595347@granite.artisan.com> Date: Wed, 14 Aug 2002 08:43:21 -0700 To: Diego-Olivier.FERNANDEZ-PONS@cicrp.jussieu.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Doubly-linked list References: <15705.12521.60353.709909@granite.artisan.com> X-Mailer: VM 7.00 under Emacs 20.7.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Diego Olivier Fernandez Pons writes: > Brian Rogoff a =E9crit > > I'm looking forward to seeing it. I get the impression that Edison = uses=20 > > (multi-parameter) type classes so it isn't clear that it will trans= late=20 ^-constructor > > well. Oh yeah, I may as well add my biannual plea for some form of > > overloading in OCaml, which is somewhere in the top 3 of my wishlis= t.=20 >=20 > I had to make many changes to Edison's structure including : >=20 > - flattening the Haskell class hierarchy > Edison has Coll, XColl, OrdColl, Set, XSet, OrdSet ... you can see = a > few diagrammas (in fact lattices) in Okasaki's overviews of Edison.= > They have been all reduced into 4 types (Sequences, Collections, > Sets and Maps) in various flavors (polymorphic, functor, in place) >=20 > - transforming some lazy data structures to strict (and providing > functors and various flavors of streams for those who want amortize= d > data structures via lazy evaluation) >=20 > - eliminating data structures that could not be translated to Caml, > which includes some multi-parameter classes (that was not the most > difficult part in fact)=20 Yes, you can always map to modules, but I think overloading (or type classes, if you want to distinguish from Ada and C++) are more convenie= nt for the user, but I suppose this is a well known disagreement that will= only be resolved by the proponents of the respective positions choosing= different languages.=20 > and non-uniform recursion (most of the last > 3 chapters of Okasaki's book, Markus Mottle had the same problem > with his translation to Caml) With OCaml 3.05 and above, you'll be able to use polymorphic methods to= =20 get non-uniform recursion. This issue has come up a lot on the list=20 (see the archives) over the years and several proposals were made for=20= adding this capability to the language. I don't know if adding this=20 feature is a priority for the developers; it isn't clear that the data structures in Okasaki's book constitute a strong enough argument for=20= adding it.=20 You may as well swipe the doubly linked list from the Cousineau/Mauny b= ook too. The library will be more useful if you're very careful about makin= g the interfaces very consistent, so that changing a data structure doesn= 't cause much source code change.=20 >=20 > There won't be much new if you already use Markus Mottle port : > - weight balanced trees (Stephen Adams 1992) > - cartesian trees (Jean Vuillemin 1980) > - catenable (functional) lists (Chris Okasaki 1998) > - chromatic trees (Sabine Hanke 1997) > - priority search queues (Ralph Hinze 2001) > - various flavors of streams > - some mutable lists > - I have also completed Pottier's simply linked circular lists >=20 >=20 > Diego Olivier -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners