Browse thread
[Caml-list] xor on booleans
[
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: | Fabrice Le Fessant <fabrice@l...> |
| Subject: | Re: [Caml-list] xor on booleans |
> For type safety, it would be better to have > > let (^^) (x:bool) (y:bool) = x <> y Type safety is not lost, since (^^) is just equivalent to (<>), which is polymorph. The polymorphic (^^) is better if I want to define my own boolean type: type bool = True | False, and use (^^) with it. - Fabrice ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners