Browse thread
[OSR] Exceptionless error management, take 2
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Bünzli_Daniel <daniel.buenzli@e...> |
| Subject: | Re: [Caml-list] [OSR] Exceptionless error management, take 2 |
Le 8 févr. 08 à 12:56, Vincent Hanquez a écrit : > For example, an `Error returned by module X could be use in a code > expecting an `Error returned by module Y, even though that the `Error > could means something totally different (semanticly). Only if they have exactly the same error cases (in which case they are very likely to attach the same semantics to it). I think you fail to think realisitically, chances are little that this is going to pose any problems in practice. Do you redefine the option type in each of your modules to be able to say this is an optional integer from module X ? > If I use normal variant, the compiler will prevent me using the same > code to match a X.Error and a Y.Error. Note that with this take 2 proposal -- that I personnaly find too invasive and heavy weight -- you won't get that, you will have to match on Error.Error (!) instead of `Error (take 1). Daniel