Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] assertions or exceptions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Radu Grigore <radugrigore@g...>
Subject: Re: [Caml-list] assertions or exceptions?
On Thu, 15 Jul 2004 14:33:59 +0100, Richard Jones <> wrote:

> let valid_hostname r =
>   try ignore (Request.hostname r); true with Not_found -> false

Maybe Request.hostname is a bad example. In general you can provide a
query that is more efficient than actually trying to do it. The
example to which I linked in the previous email was about an OpenFile
method that can throw FileNotFound paired with FileExists that returns
a boolean. I'd bet FileExists is not implemented in terms of OpenFile.

I'll stop here since I'm a troll :-P


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: