Daniel Bünzli wrote: > > Agreed - though [find] is one of the examples where you do need find > > and find_exc - because often there are occasions where before calling > > {Map,Set,Hashtbl}.find you already know that the key exists and so > > won't fail at which point the 'a option boxing is a waste of time and > > space and Not_found would be a truly exceptional situation so passes > > the previously mentioned test. > > In that case what you want is an alternate function "really_find" that > doesn't raise Not_found but Invalid_argument if the key cannot be found.
Absolutely - but the point is that there is an obvious need to have the exception vs 'a option versions of the function. Appropriate naming of exceptions in the standard library is a well-rehearsed discussion :o) David _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs