From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 70548BC6B for ; Thu, 22 Mar 2007 15:56:14 +0100 (CET) Received: from imss-1.enac.fr (imss-1.enac.fr [195.220.159.36]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2MEuAgO008056 for ; Thu, 22 Mar 2007 15:56:14 +0100 Received: from mauve.recherche.enac.fr (imss-1.imss.interne.enac [127.0.0.1]) by imss-1.enac.fr (Postfix) with ESMTP id 0A75718B3B3 for ; Thu, 22 Mar 2007 15:56:08 +0100 (CET) Received: from [10.31.1.89] (beige.recherche.enac.fr [10.31.1.89]) by mauve.recherche.enac.fr (Postfix) with ESMTP id 25FF12FA892 for ; Thu, 22 Mar 2007 15:56:11 +0100 (CET) Message-ID: <4602990B.6030406@recherche.enac.fr> Date: Thu, 22 Mar 2007 15:56:11 +0100 From: Nicolas barnier User-Agent: IceDove 1.5.0.10 (X11/20070307) MIME-Version: 1.0 To: Caml list Subject: Arg.spec and option types Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4602990D.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; barnier:01 barnier:01 enac:01 constructors:01 elegantly:01 constructors:01 initialized:01 spares:98 workaround:01 behaviour:01 int:01 int:01 string:02 string:02 arg:03 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 program. I think it would therefore be quite useful to add Set_option_{string|int|float} 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