Version française
Home     About     Download     Resources     Contact us    
Browse thread
[OSR] Exceptionless error management
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] [OSR] Exceptionless error management
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.