English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] labels and optional arguments in 3.06
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-11-14 (07:40)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] labels and optional arguments in 3.06

Jacques Garrigue wrote:

> You can write
> # (f ~a:2.0) 2.0 4.0;;
> The parenthesis creates staged applications, one labelled-style and
> the other unlabelled-style.

Is this only type-checking stuff, or does it impact 
code-generation? Namely, does this build a new closure for 
(f ~a:2.0) and then apply it to 2.0 and 4.0, or does it 
recognize that this is a direct invocation of f, thus 
skipping the closure creation?

This might be a relevant issue for inner loops, so I thought 
I might ask.


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners