English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
How to make a value uncomparable
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-04-23 (17:53)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] How to make a value uncomparable
On Wednesday 23 April 2008 18:43:18 Berke Durak wrote:
> 2008/4/23 Christophe Raffalli <christophe.raffalli@univ-savoie.fr>:
> > > But there's one minor difference: physical equality works on Weak.t but
> > > not on
> > > functions.
> >
> > What do you mean:
> I don't know

I don't think even uniqueness types can help you there but this tale might at 
least take your mind off it:

A shepherd was looking after his sheep on the side of a deserted road
Suddenly a brand new Porsche screeches to a halt. The driver, a young
man dressed in an Armani suit, Ray Bans, Tag Heuer watch, White Cerutti
shoes, tailor-made mauve shirt, with a Boss tie gets out and says to the
'If I can guess how many sheep you have, can I keep one?'
The shepherd looks at the large flock of sheep and says 'Okay'.
The young man connects his laptop to his mobile phone/fax, enters the
NASA website, scans the field using his GPS, opens the database linked
to 60 Excel tables, filled with logarithms and pivot tables, then prints
out a 150 page report on his high tech mini printer.
He studies the reports and says to the shepherd 'You have 1586 sheep'.
The shepherd replies, "That's correct. You can have the pick of my
The young man packs away his equipment, looks at the flock and puts an
animal into the boot of the Porsche.
As he is about to leave, the Shepherd says,
"If I can guess what your profession is will you return the animal to
The young man thinks for a minute and says 'Okay'.
The shepherd says 'You are a Management Consultant'.
The young man says' Correct, how did you know?'
The Shepherd replied, 'Simple.
First you came here without being invited.
Second you charged me a fee for something I already knew.
Third, you don't understand anything about my business.'
Now, please can I have my dog back?'

Dr Jon D Harrop, Flying Frog Consultancy Ltd.