On 04/12/2012 04:16 PM, Philippe Veber wrote:
Isn't this a good use case for polymorphic variants too ?

I don't see how to use polymorphic variants here. The message bus itself need to provide functions like:

  val dispatch: message -> unit
  val register_listener: (message -> unit) -> unit


How do you define the message type without having access to all possible message constructors?


-- Alain

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to