> I find the biggest advantage of objects over records to be the same as > polymorphic variants over classic variants: No surprise, the duality between sum types (normal variant) and record types (duality mean that they can encode one another through a functional encoding) can be lifted to objects for records ans polymorphic variants for sum ... In Ocaml, the polymorphic variant sare a bit too limited to have the full duality. To do it one would need the type system to know that in (match t with `A -> ... | x -> ...) x can not use `A. Nervertheless, J. Garrigue modular evaluator is a bery nice illustration of this (look at his web page for the paper). The problem is to have tuples, records, objects and modules to be only one thing (and by the way require that variant always have exactly one argument), so that you do not have to choose which approach you prefer ... Cheers, -- Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net ---------------------------------------------