From: Nicolas C. <war...@fr...> - 2003-03-10 08:40:40
|
> > Hi list ! > > > > Let's continue working together on ExtLib ! > > Here's the new version, adding some changes. > > Please report any missing function and any comments you could have on it. > > Where did Option.val_of go? (maybe I'm missing something) > The problem I can see with val_of is the following : val_of should raise an exception when you're using it with None, and if you're using a good programming style, this is the kind of excecption you have to catch quite immediatly, so I think it's better to write : match x with | None -> do_something | Some v -> use_it than try use_it (val_of x) with NoneException -> do_something Other operations such as default or map have a fully defined behavior Nicolas Cannasse |