Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Francois-Rene Rideau <fare@t...>
Subject: Re: [Caml-list] Future of labels, and ideas for library labelling
Xavier Leroy, dans son post <20010403105212.A15700@pauillac.inria.fr> 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. "List.map func" being implicitly translated to
"List.map ~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 | http://fare.tunes.org ]
[  TUNES project for a Free Reflective Computing System | http://tunes.org  ]
Procrastination is great. It gives me a lot more time
to do things that I'm never going to do.
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr