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 WAA14897; Sun, 1 Apr 2001 22:59:32 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA14742 for caml-list@pauillac.inria.fr; Sun, 1 Apr 2001 22:59:31 +0200 (MET DST) 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 LAA27715 for ; Fri, 30 Mar 2001 11:46:58 +0200 (MET DST) Received: from gatesrv.RZ.UniBw-Muenchen.de ([137.193.11.27]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f2U9kr914153 for ; Fri, 30 Mar 2001 11:46:58 +0200 (MET DST) Received: from dionysos.informatik.unibw-muenchen.de (dionysos.Informatik.UniBw-Muenchen.de [137.193.60.41]) by gatesrv.RZ.UniBw-Muenchen.de (8.11.2/8.11.2) with SMTP id f2U9gaC25466 for ; Fri, 30 Mar 2001 11:42:37 +0200 (MEST) Received: (qmail 6284 invoked by uid 210); 30 Mar 2001 09:45:23 -0000 Date: 30 Mar 2001 09:45:23 -0000 Message-ID: <20010330094523.6283.qmail@dionysos.informatik.unibw-muenchen.de> From: kahl@heraklit.informatik.unibw-muenchen.de To: caml-list@inria.fr CC: garrigue@kurims.kyoto-u.ac.jp In-reply-to: <20010330120112L.garrigue@kurims.kyoto-u.ac.jp> (message from Jacques Garrigue on Fri, 30 Mar 2001 12:01:12 +0900) Subject: Re: [Caml-list] Future of labels References: <20010330120112L.garrigue@kurims.kyoto-u.ac.jp> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jacques Garrigue replied to "Manuel Fahndrich" : > > 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. > > Not really for partial application (you rarely want to apply to a list > before the function), but rather for layout. Mostly a question of > taste, but if you like it really changes the way you use functionals. > > Anyway, if we remove labels from the standard library, this would > solve the problem. I am a long-time label user (having started when OCaml still was Caml Special Light) and I have therefore gone through quite a few relabellings of the standard library. They never really hurt me (with a 50 module 30000 line project) --- only when labels went away, it meant trouble. (To make it clear: I ONLY use label mode and do not intend to switch.) Jacques' words seem to indicate that there seems to be a complete unlabelling of the standard library in the works --- I must confess that I do not like that at all. (Is my interpretation right? I got the impression that this was the only change intended for label mode.) Especially for the ``f'' label! (This was ``fun'' before the OCaml/OLabl merger and had to be changed to accommodate the new rule that keywords were not allowed as labels anymore --- I'd rather have the keyword ``fun'' replaced by Haskell's ``\'', or by a real lambda in a suitable character set!) My point with the ``f'' label is that I need it almost always: For List.map, List.fold_right and friends I usually have only simple list arguments, but complex functions, and do not see the point why I should let-define that function beforehand. So I think it is most readable to write the following: let list3 = List.map list2 ~f:(fun x -> ..... ... x ... ..........) in .... If the ``f'' label goes away, then I need a labelled wrapper around the standard library. If none is provided, I have to write it myself, but I would much prefer to have a standard labelling of the standard library, since this also provides the label-using community with useful conventions and guidelines. And I do find the labels in the standard library useful with OCamlBrowser -- I use that much more than my copy of the html-version of the OCaml manual! Cheers, Wolfram Kahl And if the ``f'' label was to go away ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr