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] 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: 2002-07-30 (08:48)
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 Archives:
Bug reports: FAQ:
Beginner's list: