I'm not sure whether it is a real limitation, or it can be fixed, but so far there is a difference.# type t = Int : int -> t | Float : float -> t [@@deriving bin_io, compare, sexp];;Characters 22-23:type t = Int : int -> t | Float : float -> t [@@deriving bin_io, compare, sexp];;^bin_write_sum: GADTs are not supported by bin_prot
I've been learning about GADTs this weekend and I'm wondering if there is any reason to not use them all the time? Or put another way, should Ocaml have non generalized variants at all (tossing aside the legacy code thing)?