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-28 (16:43)
From: brogoff <brogoff@s...>
Subject: Re: [Caml-list] unix.chop_extension
On Fri, 28 May 2004, Keith Wansbrough wrote:
> > interface to use substrings, eliminating Not_found exceptions by considering
> > an empty substring to be a failed match.
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> It's not clear that this is always the right thing to do... \([0-9]*\)
> can succeed but return an empty substring.

Point taken. There's still a lot of "out of band" values that could be used to
represent failure, such as substrings with negative indices. And of course,
exceptions are perfectly fine for ML, though their functionalness is
arguable, and a Clean (or Haskell 2, where they'll hopefully fix this!)
substring library wouldn't have them.

-- Brian

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