From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 43221BB91 for ; Sat, 23 Jul 2005 21:01:01 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6NJ10qd015127 for ; Sat, 23 Jul 2005 21:01:00 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA16317 for ; Sat, 23 Jul 2005 21:00:59 +0200 (MET DST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6NJ0w4p015124 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 23 Jul 2005 21:00:59 +0200 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1DwPEn-0005H5-Uh for caml-list@inria.fr; Sat, 23 Jul 2005 21:00:41 +0200 Received: from 0x50a5bb8d.odnxx9.adsl-dhcp.tele.dk ([80.165.187.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 Jul 2005 21:00:41 +0200 Received: from spam by 0x50a5bb8d.odnxx9.adsl-dhcp.tele.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 Jul 2005 21:00:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Bardur Arantsson Subject: Re: How to do this properly with OCaml? Date: Sat, 23 Jul 2005 20:52:44 +0200 Message-ID: References: <42E2393B.5030209@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 0x50a5bb8d.odnxx9.adsl-dhcp.tele.dk User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050722) X-Accept-Language: en-us, en In-Reply-To: Sender: news X-Miltered: at nez-perce with ID 42E293EC.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42E293EA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 syntax:01 cheers:01 sdu:01 lips:98 wrote:01 sourceforge:01 functions:01 alexander:02 objects:02 module:03 library:03 michael:08 john:08 spam:88 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Michael Alexander Hamburg wrote: > Ouch. > > I bow to your superior experience. > > Is there a syntax which makes treatment of options easy? That is, if > about every other line of my library is an action on objects from this > array, is there a convenient way to use options without cluttering up the > code? Well, not sure if it's exactly what you're looking for, but ExtLib has an Option module which contains various convenience functions for working with option values. See http://ocaml-lib.sourceforge.net/doc/Option.html Cheers, -- Bardur Arantsson In anticipation, John licked his own lips. A. Lloyd, http://adamcadre.ac/lyttle.html