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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C7213BB9A for ; Sun, 13 Nov 2005 13:47:06 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jADCl6cu006650 for ; Sun, 13 Nov 2005 13:47:06 +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 NAA14775 for ; Sun, 13 Nov 2005 13:47:05 +0100 (MET) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jADCl5xg006642 for ; Sun, 13 Nov 2005 13:47:05 +0100 Received: from [192.168.9.50] (did75-12-82-236-3-6.fbx.proxad.net [82.236.3.6]) by smtp4-g19.free.fr (Postfix) with ESMTP id 787223FDCF for ; Sun, 13 Nov 2005 13:47:05 +0100 (CET) Message-ID: <43773699.2000802@aist.enst.fr> Date: Sun, 13 Nov 2005 13:50:33 +0100 From: Florent User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] strange behavior with record type definition References: <4375DDFC.9060802@motion-twin.com> <1131799890.18524.14.camel@rosella> <4375FACF.3040906@aist.enst.fr> <20051113.091253.108310233.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20051113.091253.108310233.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 437735CA.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 437735C9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 syntax:01 syntax:01 inference:01 wrote:01 explicitly:01 essentially:01 jacques:01 jacques:01 objects:02 objects:02 labels:02 garrigue:03 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 Thanks for your responses , Well, this is not an usual behavior for records, but why not. If this choice has been made by the ocaml team, I'll use different label names for my records. florent Jacques Garrigue wrote: >It is not a question about it being possible or not (it is possible, >and can even be made "principal"), but whether we want it in the >language or not. >Essentially, ocaml has two kinds of records: explicitly >declared records, and objects. Of course, objects as records >are not very efficient, but in many cases this doesn't matter. >You can even find a syntax extension to do it with the same syntax as >records. > http://www.math.nagoya-u.ac.jp/~garrigue/code/ocaml.html > >Knowing this, the choice is currently to make explicit records >non-ambiguous. This way you just have to look at any of the the >labels to know exactly which type is involved. This could be changed, >but you would loose this property. Which would be fine with me, as >long as the information is still still easy to deduce without relying >on type inference. > >Jacques Garrigue > >