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 (18:32)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] labels and optional arguments in 3.06

>This problem
>only appears when you have labelled arguments AND optional arguments
>AND you don't want to label the labelled arguments in your function

I would restate this (to conveniently make it sound less radical/more 
radical in my favor :).  If you are using labels primarily for 
documentation, but you rarely if ever apply them on calls, and then you 
want to use optional arguments, you are suddenly forced to always use 
labels on those calls.  This could force you to label zillions of calls in 
your huge codebase when you add an optional argument to a label-documented 
function, but wait, that goes completely against the intent of optional 
arguments (that you don't know they're there unless you care)!  Therefor, 
one is incented to not use labels at all.

There, that sounds better/worse, doesn't it?  :)

>A fully symmetric definition is much harder to obtain, and to

If it's really hard to make it symmetric, then I wouldn't bother.  It's not 
worth it if it doesn't "just work" in all cases (except cases with 
duplicate labels).


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