From: Eric C. C. <ec...@cm...> - 2003-03-01 01:17:02
|
On Fri, Feb 28, 2003 at 07:54:29PM -0500, Manos Renieris wrote: > I don't know how other people feel, but to me, the short names in > String (ftos, stoi, stof) look very ugly. I agree. > String.to_float, String.to_int, and String.to_float seem much better, > and more consistent with the choices in the standard library. > An Int module with things like Int.of_string = int_of_string also > sounds like a good idea, I'm tired of moving between Int32.t's and > int's and having to change all sorts of functions. Good suggestions. Another issue: I see (at least) two philosophies of exception naming. (1) The standard library only defines a few, and uses string arguments (to Failure and Invalid_argument) for specifics. (2) Nicolas's collection uses more numerous and specific exceptions: Invalid_index Invalid_string No_such_element ... I guess I'm used to the first approach, and the generality hasn't been a problem. I've almost always been able to write something like try ... with Failure _ -> ... and often just try ... with _ -> ... rather than being more specific. What has been the experience of others on this list? -- Eric C. Cooper e c c @ c m u . e d u |