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 RAA13616; Thu, 8 Apr 2004 17:14:39 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 RAA14047 for ; Thu, 8 Apr 2004 17:14:38 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i38FFPjq011245 for ; Thu, 8 Apr 2004 17:15:29 +0200 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1BBbEZ-0000Ge-00 for ; Thu, 08 Apr 2004 16:14:27 +0100 Date: Thu, 8 Apr 2004 16:14:27 +0100 To: Ocaml Mailing List Subject: Re: [Caml-list] Dynamically evaluating OCaml code Message-ID: <20040408151427.GA740@redhat.com> References: <20020104004356.GA1672@mev> <20040408133727.GC29195@excelhustler.com> <20040408145606.GA18473@fichte.ai.univie.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040408145606.GA18473@fichte.ai.univie.ac.at> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce 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 val:01 python:01 type-safe:01 ltd:98 ocaml:01 caml:01 caml:01 int:01 0200,:01 simpler:01 mottl:02 business:96 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 148 On Thu, Apr 08, 2004 at 04:56:06PM +0200, Markus Mottl wrote: > 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. My "private library" defines: val first : int -> 'a list -> 'a list which returns the first n members of a list. As for slicing the middle from a list, I tend to think that the original poster should probably be using a different, more suitable structure. Perhaps an Array if he wants random access. > > Yes, I could write functions to do all of this, but my point is that > > I shouldn't have to. > > The point of the standard library is not to have a function for every > imaginable problem but to have ones that cover standard problems. Well, having a broad library helps to implement things. For example, LWP-like functionality [in perl4caml] makes writing scripts which analyse websites an awful lot simpler. Having functions which allow me to convert from Y/M/D to ISO-standard years and weeks [which I have written] makes writing business analysis functions more tractable. Perl and Python have all this stuff, which makes it much easier to implement these sorts of boring businessy programs. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment Perl4Caml lets you use any Perl library in your type-safe Objective CAML programs. http://www.merjis.com/developers/perl4caml/ ------------------- 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