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
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