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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id DC620BC6B for ; Mon, 11 Feb 2008 09:13:03 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAOORr0fAXQInh2dsb2JhbACQOQEBAQgKKZYX X-IronPort-AV: E=Sophos;i="4.25,332,1199660400"; d="scan'208";a="9014956" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 11 Feb 2008 09:13:03 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1B8D3Ch022609 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 11 Feb 2008 09:13:03 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAB6Sr0fBMVMQh2dsb2JhbACQOQEBAQgKKZYX X-IronPort-AV: E=Sophos;i="4.25,332,1199660400"; d="scan'208";a="7887876" Received: from minbis.univ-orleans.fr (HELO min.univ-orleans.fr) ([193.49.83.16]) by mail1-smtp-roc.national.inria.fr with ESMTP; 11 Feb 2008 09:13:03 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id EE13612B3C3; Mon, 11 Feb 2008 09:13:01 +0100 (CET) Received: from [192.168.0.12] (ras75-4-82-235-58-110.fbx.proxad.net [82.235.58.110]) by smtps.univ-orleans.fr (Postfix) with ESMTP id B1B2A36E5B; Mon, 11 Feb 2008 09:13:01 +0100 (CET) Subject: Re: [Caml-list] [OSR] Exceptionless error management From: David Teller To: =?ISO-8859-1?Q?B=FCnzli?= Daniel Cc: caml-list List In-Reply-To: References: Content-Type: text/plain; charset=utf-8 Date: Mon, 11 Feb 2008 09:12:58 +0100 Message-Id: <1202717578.6348.13.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 47B0038F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; univ-orleans:01 yaron:01 val:01 bool:01 val:01 cheers:01 0100,:01 beginner's:01 ocaml:01 bug:01 univ-orleans:01 lifo:01 liquidations:98 beginners:01 wrote:01 I've re-read the candidate and I have one suggestion: at the moment, you want to standardize both `Success and `Error and use `Error to carry further results. Why not trim-down slightly this recommandation and standardize only `Success (or the more concise `Ok, as suggested by Yaron) ? This would let us have val find: ('a -> bool) -> 'a list -> [`Ok of 'a | `Not_found] val open_file : string -> [`Ok of file_handler | `No_such_file | `No_authorization] etc. I believe this would make code more readable. Cheers, David On Thu, 2008-01-31 at 09:55 +0100, Bünzli Daniel wrote: > Hello, > > Based on discussions and the resulting consensus that occured more > than once on this list. I wrote a recommendation on how modules should > perform error management. It is available here : > > http://cocan.org/osr/exceptionless_error_management > > Best, > > Daniel > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- David Teller Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.