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 DAA09958; Tue, 3 Apr 2001 03:36:18 +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 DAA09955 for ; Tue, 3 Apr 2001 03:36:17 +0200 (MET DST) Received: from smtp2.andrew.cmu.edu (SMTP2.ANDREW.CMU.EDU [128.2.10.82]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f331aEj16584 for ; Tue, 3 Apr 2001 03:36:14 +0200 (MET DST) Received: from UNIX12.ANDREW.CMU.EDU (UNIX12.ANDREW.CMU.EDU [128.2.11.212]) by smtp2.andrew.cmu.edu (8.9.3/8.9.3) with ESMTP id VAA07939 for ; Mon, 2 Apr 2001 21:36:13 -0400 (EDT) Date: Mon, 2 Apr 2001 21:36:13 -0400 (EDT) From: Kipton M Barros To: caml-list@inria.fr Subject: Re: [Caml-list] Future of labels, and ideas for library labelling In-Reply-To: <20010403093527G.garrigue@kurims.kyoto-u.ac.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk As a beginning Caml programmer, I'm a fan of strong labels. Their utility in documenting libraries like LablTk is obvious, but I find that even for "simple" functions like List.fold_left they're helpful. Having good label names both serves as a quick reminder of which arguments are what, but also can help to remind what the function does. In my experience, I usually have to reference a function a few times before getting it memorized; having labels can serve as a mental cue, speeding up the process. One label stumbling block I've had is some syntax confusion. Specifically, it took me some trial and error to figure out how to do: let f ~x:y:int = y;; and let f ~(x:int) = x;; Are these constructs mentioned in the tutorial? Another minor point which may have been mentioned: sometimes when a label is missing, the compiler can give cryptic error messages. It might not be generally possible, but it would be great if the compiler could sometimes say "maybe missing label here:". I seem to remember Markus Mottl mentioning earlier something about labels hindering higher order programming (?). If I got that right, I'm curious: what are some examples? Kipton ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr