Browse thread
Preferred use of Invalid_argument and Failure
[
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: | Yaron Minsky <yminsky@c...> |
| Subject: | Re: [Caml-list] Preferred use of Invalid_argument and Failure |
As in:
map_of_alist : ('a * 'b) list -> [ `Repeated_key of 'a | `Succ of ('a,'b)
Map.t ]
The return value is both explicit and a polymorphic variant.
y
On 10/24/07, Joel Reymont <joelr1@gmail.com> wrote:
>
> Yaron,
>
> On Oct 24, 2007, at 12:05 PM, Yaron Minsky wrote:
>
> > Where I work, we have come to dearly love the practice of returning
> > polymorphic variants with explicit variants for various "normal"
> > error cases.
>
> Can you elaborate? Are your explicit variants still polymorphic?
>
> --
> http://wagerlabs.com
>
>
>
>
> _______________________________________________
> 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
>