From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA21170; Tue, 30 Jul 2002 10:48:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA21062 for ; Tue, 30 Jul 2002 10:48:00 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6U8lwj23345; Tue, 30 Jul 2002 10:47:58 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA21148; Tue, 30 Jul 2002 10:47:57 +0200 (MET DST) Date: Tue, 30 Jul 2002 10:47:57 +0200 From: Xavier Leroy To: John Prevost Cc: Caml-list Subject: Re: [Caml-list] Serious typechecking error involving new polymorphism (crash) Message-ID: <20020730104757.D6564@pauillac.inria.fr> References: <20020729144527.A30919@pauillac.inria.fr> <000f01c2377c$36263060$2097fea9@janxp> <86vg6xlktk.fsf_-_@laurelin.dementia.org> <20020730095833.B6564@pauillac.inria.fr> <86ofcplj54.fsf@laurelin.dementia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <86ofcplj54.fsf@laurelin.dementia.org>; from j.prevost@cs.cmu.edu on Tue, Jul 30, 2002 at 04:22:47AM -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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