Browse thread
Representation of different polymorphic variants guaranteed to be different?
[
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: | Eric Cooper <ecc@c...> |
| Subject: | Re: [Caml-list] Representation of different polymorphic variants guaranteed to be different? |
On Wed, Jul 08, 2009 at 08:35:27PM +0200, Bruno Daniel wrote:
> How is it ensured that I get a <> b for a and b created as
> polymorphic variants from two different identifiers? Will pattern
> matching give wrong results if I accidentally choose two different
> identifiers translated to the same internal representation?
See this thread:
http://caml.inria.fr/pub/ml-archives/caml-list/2005/03/544288096a47d82ec870d01c8396f5fe.fr.html
Short answer: collisions could theoretically occur, but are detected
at link time.
--
Eric Cooper e c c @ c m u . e d u