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
[Caml-list] Why are arithmetic functions not polymorph?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] Why are arithmetic functions not polymorph?
> I don't understand this, because comparison funtions ('<', '>', ...)
> are polymorph.
> So, where is the problem with arithmetic functions?

Because perhaps there is always a good way to compare two data structures
(with the exception of functions) since we can recursively compare their C
representations, but there is not a good way to actually add or even
multiply them.

For exemple it somehow makes sense to compare  [] with [2] ( in that case []
< [2] ) but what about [] / [2]  ?

Nicolas Cannasse

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: