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 LAA21847; Wed, 26 May 2004 11:34:04 +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 LAA21838 for ; Wed, 26 May 2004 11:34:03 +0200 (MET DST) Received: from smtp001.mail.ukl.yahoo.com (smtp001.mail.ukl.yahoo.com [217.12.11.32]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i4Q9Y2EV012916 for ; Wed, 26 May 2004 11:34:02 +0200 Received: from unknown (HELO yahoo.it) (pasckosky2000@213.255.109.130 with plain) by smtp001.mail.ukl.yahoo.com with SMTP; 26 May 2004 09:34:02 -0000 Message-ID: <40B464CD.8070503@yahoo.it> Date: Wed, 26 May 2004 11:35:09 +0200 From: Luca Pascali User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xavier Leroy CC: skaller , caml-list Subject: Re: [Caml-list] unix.chop_extension References: <1085429093.6065.336.camel@pelican.wigram> <20040526110508.A17806@pauillac.inria.fr> In-Reply-To: <20040526110508.A17806@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 40B4648A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 chop:01 chop:01 foo:01 usefulness:01 usefulness:01 compilers:01 she:98 imho:01 unix:02 wrote:03 execute:04 anyway:05 anyway:05 mean:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy wrote: [CUT] >>here's one extra thing I'd like to point out. We have the >>chop_extension function. Why in the world is there no find_extension >>function? >>find_extension "foo.bar" --> "bar" >> >> > >Why in the world would that be generally useful? Remember, we don't >shoot for completeness (it's unattainable anyway), just for >usefulness. > >- Xavier Leroy > > > > IMHO, this might be considered more as a matter of usefulness instead of completeness. I mean that there are systems (like Windows) that use only the extension of the file to identify how to execute or how to read the file itself, and anyway the extension is useful to classify a file for any kind of application (such as compilers, network applications, graphic editing, and so on). So a developer has to write its own function to extract the extension from a filename every time he/she needs. Its not a big deal, but ... My opinion. Luca ------------------- 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