Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Future of labels
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-03 (14:02)
From: Francois-Rene Rideau <fare@t...>
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling
Xavier Leroy, dans son post <> a écrit :
> It's just too hard to maintain two versions of the same libraries.

Couldn't camlp4 be put to good use to automatically extract
an unlabelled standard library out of the labelled one?
One library would either duplicate or wrap the other (working either
on both .ml and .mli or only .mli files).
Might be an interesting student project.
I don't mean that this is forcibly the Right Thing(tm) to do,
but at least, it's an option you might consider.
Of course, if the automated unlabeller becomes rigged with subtleties
and special cases, then indeed it might become a real bad idea
(or it might require some special purpose .mli annotation language).

Also, can you remind me what was the argument against having unlabelled
arguments be translated into labelled arguments according to the declared
order of arguments? e.g. " func" being implicitly translated to
" ~f:func" because f is the first (available) label?
I admit I haven't thought too much about the typing issues, but it looks
"natural" to me. That's the way some existing languages behave, as we've
been recently reminded, and it could solve the problem with unlabelled calls
to labelled functions.

Yours freely,

[ François-René VB Rideau | Reflection&Cybernethics | ]
[  TUNES project for a Free Reflective Computing System |  ]
Procrastination is great. It gives me a lot more time
to do things that I'm never going to do.
To unsubscribe, mail  Archives: