[Opa] Int.of_string / exceptions
ogunden at phauna.org
Sat Feb 25 21:41:15 UTC 2012
On Sat, Feb 25, 2012 at 4:08 PM, Adam Koprowski
<Adam.Koprowski at mlstate.com> wrote:
> I think the solution would be to rename
> Int.of_string to Int.of_string_unsafe and make Int.of_string return an
> option type. This however will break backward compatibility. Any better
You could introduce Int.of_string_opt. But I like your suggestion
better, it fits better with the rest of the API.
As for backwards compatibility; I say the heck with it, Opa's young.
Better to break things now and keep innovating than get bogged down in
Furthermore, for a change like this, the type system will immediately
point out all the spots that need to change in a codebase, so it's a
rather low cost. Another advantage to static types ;)
More information about the Opa