Date: Tue, 12 Jan 1999 11:49:15 GMT
Message-Id: <199901121149.LAA00641@toy.william.bogus>
From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@pauillac.inria.fr
Subject: Re: Map is not tail recursive
In-Reply-To: <19990111120358.25340@pauillac.inria.fr>
<19990111120358.25340@pauillac.inria.fr>
Xavier Leroy writes:
> I would also contend that if your program routinely manipulate
> 100000-element lists, then you're probably using the wrong data
> structure anyway. But that's a different issue.
Good, I was hoping you would say that! Just because things are
traditionally done in a certain way in FP textbooks doesn't mean it
actually makes sense to do them that way in real life.
People hardly ever use linked lists in C++ or Java, and the reasons
why mostly hold good in ocaml.
However, implementing a polymorphic `vector' (resizable array) in
ocaml requires a small amount of fancy footwork because of the lack of
a universal `null' value ... there might be a case for implementing
this as part of the underlying language.
French-like paraphrase:
Les livres sur PF utilises exclusivement la linked list, mai pour la
plupart des applications cette structure n'est pas la plus efficiente.
Alors on ne l'utilise presque point en C++ ou Java. Mais ce n'est pas
100% facile =E1 faire une type `vector' en ocaml, parce ce que ocaml
manque un valeur "null".
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:17 MET