Browse thread
Re: Syntax for label
[
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: | -- (:) |
| From: | Pascal Brisset <brisset@r...> |
| Subject: | Re: Syntax for label, NEW PROPOSAL |
Jacques Garrigue writes: > From: Pierre Weis <Pierre.Weis@inria.fr> > > * undesired labels: in many cases I don't want to have labels just > > because I don't want to remember their names. (E.g., I very often > > mispell the label acc since I've always used accu to name an > > accumulator; furthermore, when I do not mispell this label, I feel > > acc:accu extremely verbose). Also because labels are verbose at > > application. > > Isn't there a classic mode for that? Something I do not understand: how could I use Labltk, for which I want to be modern, and List.fold_right, for which I do not want labels, in the same file ? By the way, the label "acc" (or even "accu") does not mean anything for me in fold_right: the iterator associates one function to each constructor of the type so I would prefer val fold_right: cons:(hd:'a -> tl:'b -> 'b) -> nil:'b -> list:'a list -> 'b [...] > It would cost nothing to add 4 more unlabelled functions to the List > module. Please add a smiley when you write such a sentence ! [...] > Or do you think that the problem is deeper, and that labels are > breaking the foundations of the language ? Please ! The debate is about presence of labels in the standard library, not in the language. Today, it is possible to teach Ocaml without speaking about objects, modules (functors are not so common in libraries), streams, etc. If labels are in the standard library you will have to explain one more (nice and not so simple) feature before being able to use one simple list iterator ... Amicalement --Pascal