Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] unix.chop_extension
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-26 (09:34)
From: Luca Pascali <pasckosky2000@y...>
Subject: Re: [Caml-list] unix.chop_extension
Xavier Leroy wrote:


>>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 
>>find_extension "" --> "bar"
>Why in the world would that be generally useful?  Remember, we don't
>shoot for completeness (it's unattainable anyway), just for
>- Xavier Leroy
IMHO, this might be considered more as a matter of usefulness instead of 

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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: