Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Equality of functional values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-01-29 (21:11)
From: Tom <tom.primozic@g...>
Subject: Re: [Caml-list] Equality of functional values
It's hard to perform equality on functional values, as it is hard to confirm
two functions being the same... (even if you know the mathematical
definition of the function, thus even harder if you only know the machine
representation of it...). The best way around is to use == equality (= is
structural equality, while == is referential equality - whether two names
point to the same address in the memory), which might return false often,
but will never fail on functional values. So I guess it's best you edit the
source code (if you can) and change it...

- Tom