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
Strange observation on polymorphic '<'
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-12-01 (23:17)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Strange observation on polymorphic '<'
On 30 Nov 2004, at 21:30, Ritesh Kumar wrote:

> Am I missing something here? Let us assume that the function which
> internally uses the '<' operator is used only in the context of 
> integers
> inside the program.

You are missing this: because of separate compilation the compiler has 
way to know whether the function will only be used on integers in your
program.  When it compiles the function, it doesn't know what it will
be used for.

-- Damien