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 MAA20652; Tue, 10 Apr 2001 12:06:56 +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 MAA20648 for ; Tue, 10 Apr 2001 12:06:55 +0200 (MET DST) Received: from psyche.kaba.or.jp (psyche.kaba.or.jp [202.249.19.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f3AA6qb19951 for ; Tue, 10 Apr 2001 12:06:53 +0200 (MET DST) Received: from vortex.kaba.or.jp (vortex.kaba.or.jp [202.249.19.21]) by psyche.kaba.or.jp (8.9.3/3.7Wpl2-psyche) with ESMTP id TAA75374; Tue, 10 Apr 2001 19:06:51 +0900 (JST) Received: from localhost (pmdhcp06.kaba.or.jp [202.249.19.118]) by vortex.kaba.or.jp (8.9.3/3.7W) with ESMTP id TAA26924; Tue, 10 Apr 2001 19:06:50 +0900 (JST) To: Claude.Marche@lri.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Future of labels, and ideas for library labelling In-Reply-To: <15058.51287.829349.768975@gargle.gargle.HOWL> References: <20010410123756H.garrigue@kurims.kyoto-u.ac.jp> <3AD2B970.BEB88A8@lri.fr> <15058.51287.829349.768975@gargle.gargle.HOWL> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010410190947P.garrigue@kurims.kyoto-u.ac.jp> Date: Tue, 10 Apr 2001 19:09:47 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Bonjour Claude, I'm sorry for taking so much bandwidth with this discussion. Yet I do not see where it can be done, other than the caml-list. As I put in my disclaimer, if you're not interested, you can just discard on the title. Not the best solution, but... > I see a strong analogy between unlabelled/labelled arguments of > functions and tuples/records types: both are defining product types, > records are usually useful when there are a large numbers of > components, and when you do not want to remember the order of > them. And moreover the { r with ... } construct allows some kind of > default values in records. But could we imagine any useful application > to a record-like type where a record contains both labelled and > non-labelled fields? I don't think so. Well, psi-terms in Life (developped at DEC PRL 10 years ago) had such a feature, and that's where the labels come from. Since they were also used for data, I would suppose people also used this syntax mixing labelled and unlabelled fields in records. A good exemple is a syntax tree: nodes are represented by records, where one of the fields is a variant giving the type of the node, and eventually the children. Other fields describe various features of this node, like position, type, etc... It seems to me that this main field could very well do without a field name: in Caml's source it is called desc for description (I think), but I'm not sure everybody knows what desc stands for... So, yes, mixing labels and unlabelled fields in a record may be perfectly meaningful. It is just that most languages do not provide such a feature. Not that I mean that this feature is really needed: you have much less record descriptions in a program than function calls. Cheers, Jacques Garrigue ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr