Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] OCaml 3.05 released
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Serious typechecking error involving new polymorphism (crash)
> Polymorphic methods should be safe, as far as I can tell, since method
> calls provide natural points of polymorphism

You're right, the implicit function abstraction performed by methods
obviate the problem.  So, polymorphic methods are safe, it's "only"
polymorphic record fields that are broken.

> Can you share any plans for polymorphic records?  I can see no way to
> make them safe except to restrict the contents to function values

We'll need to discuss that within the Caml team, of which a
significant part is on vacations :-)  However, a natural solution is
indeed to apply the same generalization criterion as for polymorphic
"let": only expressions that are syntactic values (function
abstractions, identifiers, construction of non-mutable data
structures) can be put in a polymorphic record field.

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners