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 VAA16006; Thu, 29 Mar 2001 21:56:52 +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 VAA15995 for ; Thu, 29 Mar 2001 21:56:51 +0200 (MET DST) Received: from mail3.microsoft.com (mail3.microsoft.com [131.107.3.123]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f2TJunH29297 for ; Thu, 29 Mar 2001 21:56:50 +0200 (MET DST) Received: from 157.54.1.52 by mail3.microsoft.com (InterScan E-Mail VirusWall NT); Thu, 29 Mar 2001 11:54:59 -0800 (Pacific Standard Time) Received: from red-msg-04.redmond.corp.microsoft.com ([157.54.12.74]) by inet-imc-06.redmond.corp.microsoft.com with Microsoft SMTPSVC(5.0.2195.2883); Thu, 29 Mar 2001 11:56:41 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.4418.65 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Future of labels Date: Thu, 29 Mar 2001 11:56:40 -0800 Message-ID: Thread-Topic: [Caml-list] Future of labels Thread-Index: AcC4eVjb3K9POquKTO6OcYX0A/mRuAADOryQ From: "Manuel Fahndrich" To: X-OriginalArrivalTime: 29 Mar 2001 19:56:41.0306 (UTC) FILETIME=[5F77D3A0:01C0B88A] Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I use label in classic mode, mostly to disambiguate arguments of the same type and a little bit for documentation. To see if I could do with modern mode, I tried to compile my current code base with -modern. This seems to not be too bad, except for 2 things, one being a show stopper: 1) The standard library requires ~f: labels on many function arguments. That seems silly. I basically had to add ~f: to many places where it did not add disambiguation (f is not a very explicit name). I can see that for partial applications that might be useful, but still I found this a bit annoying. 2) If some library function requires a function argument with labeled arguments, such as Map.fold f:(key:key -> data:'a -> 'b -> 'b) and I happen to have a function around that would do the right fold operation, except that it is unlabeled or has different labels, then I'm stuck. I have to write an eta conversion. Why isn't an explicit cast to change the labels of a function sound? I tried that and it didn't work. Other than the above, it seems that a casual user like me could move from classic to modern, especially if there are some further benefits like partial applications in different orders. One thing that needs improvement though are the error messages. Because the compiler tries to reorder arguments etc., forgetting a label spits out really whacky messages like, this function expects too many arguments. -Maf ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr