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 UAA10023; Thu, 10 May 2001 20:43:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA10019 for ; Thu, 10 May 2001 20:43:53 +0200 (MET DST) Received: from mail2.microsoft.com (mail2.microsoft.com [131.107.3.124]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f4AIhq913010 for ; Thu, 10 May 2001 20:43:52 +0200 (MET DST) Received: from 157.54.7.67 by mail2.microsoft.com (InterScan E-Mail VirusWall NT); Thu, 10 May 2001 11:43:51 -0700 (Pacific Daylight Time) Received: from red-msg-04.redmond.corp.microsoft.com ([157.54.12.74]) by inet-imc-04.redmond.corp.microsoft.com with Microsoft SMTPSVC(5.0.2195.2883); Thu, 10 May 2001 11:43:31 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.4688.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Record pattern matching Date: Thu, 10 May 2001 11:43:30 -0700 Message-ID: <0C682B70CE37BC4EADED9D375809768A02DB1FEF@red-msg-04.redmond.corp.microsoft.com> Thread-Topic: [Caml-list] Record pattern matching Thread-Index: AcDXJN62VSjaIfGfTKWCOqpJXumsbACW37GA From: "Don Syme" To: "John Max Skaller" Cc: X-OriginalArrivalTime: 10 May 2001 18:43:31.0181 (UTC) FILETIME=[1C1969D0:01C0D981] Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > I guess this is considered a feature, but I just wanted to report that > > in my current situation I actually find it unhelpful.=20 >=20 > You'd rather be forced to code something like: >=20 > function { a=3Da; b=3D_ } -> a;; >=20 > where all the fields have to be named, but some of them can=20 > be specified as ignored? I guess the point is that I don't use record pattern matching much, and where I do I don't want partial matches. Or at least I have a cases where enforcing full matching would catch more bugs. For example, if I'm writing marshalling code for the record by hand I want the type system to tell me if I have forgotten to marshal a field. > There is a sense in which >=20 > record.a >=20 > is just a shorthand for >=20 > match record with { a=3Dvalue } -> value >=20 > which means that you might argue that the notation=20 >=20 > record.a >=20 > should be completed by naming every field too :-) You could argue that, but I wouldn't.... Don ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr