From: Bardur A. <oca...@sc...> - 2004-12-17 09:09:22
|
On Fri, Dec 17, 2004 at 06:38:58PM +1100, skaller wrote: > On Thu, 2004-12-16 at 20:47, Bardur Arantsson wrote: > > > 2) Path manipulation: An extended and "regularized" (think > > 'principle of least surprise') version of Filename. > > > > In fact, I have a "Path" module up at > > > > http://www.imada.sdu.dk/~bardur/personal/45-programs/index.html > > (search for "ocaml-path") > > http://webperso.easyconnect.fr/gildor/ocaml-fileutils.html This looks *very* interesting and the license seems to be ExtLib-compatible. :) However, for glancing at the code there are a couple of minor issues: - It uses lexers and parsers for reducing path names to an internal representation which seems like overkill. (Or is it just me?) - The FileUtil module seems a bit rough around the edges, for instance FileUtil.cmp uses Stream.of_channel to compare files character-by-character -- hopefully the channel itself does readahead, but even so it is probably still hideously slow. The size handling also seems strange (why not just always convert input sizes to number of bytes?), but again, maybe that's just me. Overall, I must say I like it a lot. It has very little in the way of OS-specific code and it already has a reasonable set of test cases. ... which brings up another thing which ExtLib is missing: A test suite (and some mechanism for executing it). We have already seen examples of bugs which unit testing could easily have caught (read_i32, DynArray.append). It also provides some reasonable degree of regression testing if implementations are changed. I think we should definitely add one, especially since there are quite a few modules already which could benefit from it. -- Bardur Arantsson <ba...@im...> <ba...@sc...> Anyone who is capable of getting themselves made President should on no account be allowed to do the job. Douglas Adams | Hitchiker's Guide to the Galaxy |