From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] type of ==
Date: Mon, 18 Apr 2005 12:27:06 +0100 [thread overview]
Message-ID: <200504181227.07108.jon@ffconsultancy.com> (raw)
In-Reply-To: <42637B63.1070608@ifp.fr>
On Monday 18 April 2005 10:18, Christophe DEHLINGER wrote:
> I was recently in a situation where I would have liked to be able to
> test physical equality on terms of possibly different types, but
> couldn't because of =='s 'a -> 'a -> bool type.
> Why isn't its type 'a -> 'b -> bool ? Is there more to the
> implementation of == than a simple physical, asm-level equality test ?
> Is it because of the semantics of == ? If so, is a 'a -> 'b -> bool
> equivalent possible / already existing ?
If there were an "'a -> 'b -> bool" physical equality test, how could it ever
return "true"?
> I guess something like fun a b
> -> a == (Obj.magic b) should work, but regular posts on this list have
> gradually scared me off from ever using the obscure Obj module.
Yes, if you're writing self-contained OCaml programs then you should never use
Obj.
You may find the beginners list more appropriate for these kinds of questions,
BTW.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
next prev parent reply other threads:[~2005-04-18 11:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-18 9:18 Christophe DEHLINGER
2005-04-18 11:27 ` Jon Harrop [this message]
2005-04-18 12:11 ` [Caml-list] " Andreas Rossberg
2005-04-18 13:10 ` Christophe DEHLINGER
2005-04-18 14:28 ` Jon Harrop
2005-04-19 7:12 ` [Caml-list] type of == - Bayesian Filter detected spam Christophe DEHLINGER
2005-04-18 16:16 ` [Caml-list] type of == Remi Vanicat
2008-01-05 16:41 Type_of? Dario Teixeira
2008-01-05 17:12 ` [Caml-list] Type_of? Jeremy Yallop
2008-01-05 17:43 ` Arnaud Spiwack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200504181227.07108.jon@ffconsultancy.com \
--to=jon@ffconsultancy.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox