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
Arg.spec and option types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-22 (14:56)
From: Nicolas barnier <barnier@r...>
Subject: Arg.spec and option types
Hi list,

I find the recent addition of the Set_{string|int|float} constructors
of type Arg.spec quite useful, as it spares a lot of repeated code
for processing command line arguments. However, for optional arguments,
I often feel the need (and write the code) to handle option types,
which can elegantly be processed to trigger optional behaviours of a

I think it would therefore be quite useful to add 
constructors which would expect {string|int|float} option ref values as
arguments (usually initialized with None). Do others think the same or use
some other workaround to obtain this behaviour ?

-- Nicolas