Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Luca Pascali <pasckosky2000@y...>
Subject: Re: [Caml-list] unix.chop_extension
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