From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA07170 for caml-redistribution; Tue, 12 Jan 1999 16:33:03 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA13228 for ; Tue, 12 Jan 1999 15:57:05 +0100 (MET) Received: from mail4.svr.pol.co.uk (mail4.svr.pol.co.uk [195.92.193.211]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id PAA18304 for ; Tue, 12 Jan 1999 15:57:03 +0100 (MET) Received: from modem-100.erythromycin.dialup.pol.co.uk ([62.136.65.228] helo=toy.william.bogus ident=williamc) by mail4.svr.pol.co.uk with esmtp (Exim 2.10 #1) id 1005Fd-00026y-00 for caml-list@pauillac.inria.fr; Tue, 12 Jan 1999 14:57:02 +0000 Received: (from williamc@localhost) by toy.william.bogus (8.8.7/8.8.7) id LAA00641; Tue, 12 Jan 1999 11:49:15 GMT Date: Tue, 12 Jan 1999 11:49:15 GMT Message-Id: <199901121149.LAA00641@toy.william.bogus> From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable To: caml-list@pauillac.inria.fr Subject: Re: Map is not tail recursive In-Reply-To: <19990111120358.25340@pauillac.inria.fr> References: <369885D1.1C8A1269@ind-cr.uclm.es> <19990111120358.25340@pauillac.inria.fr> X-Mailer: VM 6.34 under Emacs 20.2.1 Sender: weis 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".