Browse thread
Re: [Caml-list] Future of labels
-
Yaron M. Minsky
-
Jacques Garrigue
-
Judicael Courant
- Markus Mottl
- kahl@h...
- Chris Hecker
-
Judicael Courant
-
Jacques Garrigue
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2001-04-03 (01:36) |
From: | Kipton M Barros <kbarros@a...> |
Subject: | Re: [Caml-list] Future of labels, and ideas for library labelling |
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