Browse thread
A nastier example
[
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: | 2005-05-14 (19:09) |
From: | Jon Harrop <jon@f...> |
Subject: | Re: [Caml-list] A nastier example |
On Saturday 14 May 2005 15:51, Julien Verlaguet wrote: > Is this the behaviour we want ? Ideally, no. > Can two values of different types be equal ? In theory, no. > I agree that this wouldn't be a problem if it would only work in a > toplevel ... Does code ever work differently in the top-level than when compiled (with ocamlc)? Should it? > But it compiles in structures as well !! I think everyone would agree that there are caveats here but this is a question of trade-offs. So the question should be "how can we improve upon the current implementation?". To which the answer, for me at least, is "I can't". There are many pitfalls associated with equality in OCaml but the existence of polymorphic comparisons is easily justified by their usefulness, IMHO. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists