From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6D727BB81 for ; Sat, 12 Nov 2005 13:51:44 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jACCphqx020925 for ; Sat, 12 Nov 2005 13:51:43 +0100 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 NAA17949 for ; Sat, 12 Nov 2005 13:51:43 +0100 (MET) Received: from ash25e.internode.on.net (ash25e.internode.on.net [203.16.214.182]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jACCpfjw010850 for ; Sat, 12 Nov 2005 13:51:42 +0100 Received: from rosella (ppp7-104.lns1.syd7.internode.on.net [59.167.7.104]) by ash25e.internode.on.net (8.12.9/8.12.6) with ESMTP id jACCpVg1097984; Sat, 12 Nov 2005 23:21:32 +1030 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] strange behavior with record type definition From: skaller To: Nicolas Cannasse Cc: Florent , caml-list@inria.fr In-Reply-To: <4375DDFC.9060802@motion-twin.com> References: <43752259.80800@aist.enst.fr> <4375CAC8.5030803@aist.enst.fr> <1131797575.18524.0.camel@rosella> <4375DDFC.9060802@motion-twin.com> Content-Type: text/plain Date: Sat, 12 Nov 2005 23:51:30 +1100 Message-Id: <1131799890.18524.14.camel@rosella> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4375E55F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4375E55D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 cannasse:01 hmmm:01 ...:98 wrote:01 sourceforge:01 expression:01 nicolas:02 construct:02 labels:02 types:02 quite:06 classes:06 strange:07 definition:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Sat, 2005-11-12 at 21:20 +0900, Nicolas Cannasse wrote: > >>Mmhh, why do we have to use differents label names in distinct record > >>types ? > > > > > > So that the type of an expression: > > > > { x = 1; y = 2 } > > > > can be determined. > > It could still be determined using all the labels together instead of > the first one only, but that will not go well with the { r with ... } > construct. Hmmm .. but that must have the type of r, so if you had a 'multi-label' solution this would be quite nice, since it would help constrain the type of r. In a whole program analyser this would always be enough: if there is any doubt due to some unused fields, then those fields would just be dropped since they're not used .. :) [Felix will do this for classes, not so much by design as because that's how the instantiator works ..] -- John Skaller Felix, successor to C++: http://felix.sf.net