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 RAA17139; Thu, 8 Apr 2004 17:31:22 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 RAA17044 for ; Thu, 8 Apr 2004 17:31:21 +0200 (MET DST) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i38FVKYM001339 for ; Thu, 8 Apr 2004 17:31:20 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay02.plus.net with esmtp (Exim) id 1BBbUt-0009xl-Rx for caml-list@inria.fr; Thu, 08 Apr 2004 15:31:19 +0000 From: Jon Harrop Organization: University of Cambridge To: Ocaml Mailing List Subject: Re: [Caml-list] Dynamically evaluating OCaml code Date: Thu, 8 Apr 2004 16:31:26 +0100 User-Agent: KMail/1.5.4 References: <20020104004356.GA1672@mev> <20040408133727.GC29195@excelhustler.com> <20040408145606.GA18473@fichte.ai.univie.ac.at> In-Reply-To: <20040408145606.GA18473@fichte.ai.univie.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404081631.26461.jdh30@cam.ac.uk> X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dynamically:01 2004:99 hurts:01 ocaml's:01 lacks:01 productive:01 productive:01 compilers:01 she:98 ocaml:01 ocaml:01 interfaces:01 mottl:02 flatten:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 152 On Thursday 08 April 2004 3:56 pm, Markus Mottl wrote: > On Thu, 08 Apr 2004, John Goerzen wrote: > > Similar complaints exist for working with subsets of lists; it's really > > too hard to say "replace elements 4 through 9 with this", "delete > > elements 4 through 9", "return elements 4 through 9", etc. > > Yes, it's hard to do this with the current standard library. The question > is: who needs these functions anyway? I can't remember ever having felt > a need for them. I could do with them! There are numerous such functions (and nice implementations, like "List.nth -1 l" fetching the last element, more powerful flatten etc.) which Mathematica has and which I miss. > > (While we're at it, I think it's silly that there is a list and an > > array type). > > I beg your pardon - what else do you have in mind??? Yes, what the hell are you talking about? ;-) > > This library problem hurts productivity, and in some cases makes OCaml > > less productive than even C. > > Things are not half as bad as you describe them here. There may be > cases where C is more productive - because you happen to have a library > function for the problem. But even in this case you can just interface > to C, which is really not that difficult. I wouldn't describe using multiple languages, multiple compilers, adding new source files, object files and writing code to transform ocaml's internal representations into those necessary for the language and back again as "really not that difficult". Quite the contrary, in fact, I have found it to be "quite difficult". I certainly wouldn't expect Jo User, whilst evaluating ocaml as yet another new language, to have to implement safe interfaces to common functions found in a language he/she already knows just to get a working program. > There are surely cases where the OCaml standard library lacks generally > useful functionality, but it's usually good enough for most problems. Yes, it is currently sufficeable. Cheers, Jon. ------------------- 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