Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Variants & structural ordering
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Guichard <alphablock@o...>
Subject: Re: [Caml-list] Variants & structural ordering

Thanks to all for your answers.

I am aware my code exemple is quite artificial, certainly integers are simpler in this particular case.

My more profound question was: are variants treated as an enumeration or not ?
And the answer is: OCaml variants are certainly treated as an initial algebra, but not exactly as an enumeration, thus their relative order is not meaningfull to the compare function.
And it will not change in near future.

Ok, i can live with that.

- damien