From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 32134BB91 for ; Fri, 10 Dec 2004 12:59:08 +0100 (CET) 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 iBABx7Hs013095 for ; Fri, 10 Dec 2004 12:59:07 +0100 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 MAA03632 for ; Fri, 10 Dec 2004 12:59:07 +0100 (MET) Received: from annexia.force9.co.uk (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBABx63I013092 for ; Fri, 10 Dec 2004 12:59:07 +0100 Received: from rich by annexia.force9.co.uk with local (Exim 3.36 #1 (Debian)) id 1CcjQR-0007b2-00 for ; Fri, 10 Dec 2004 11:59:07 +0000 Date: Fri, 10 Dec 2004 11:59:07 +0000 Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: environment idiom Message-ID: <20041210115907.GA29002@annexia.org> References: <9410EC84C0872141B27A2726613EF45D02A52E08@psmrdcex01.psm.pin.safeco.com> <20041209090911.GA21478@annexia.org> <1102597946.90156.19.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <1102597946.90156.19.camel@localhost> User-Agent: Mutt/1.5.6+20040722i From: Richard Jones X-Miltered: at nez-perce with ID 41B98F8B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41B98F8A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 wrote:01 compile-time:01 hash:01 run-time:01 compile-time:01 run-time:01 ocaml:01 statically:01 hash:01 hashtbl:01 hashtbl:01 runtime:01 runtime:01 X-Attachments: type="application/pgp-signature" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 09, 2004 at 03:12:25PM +0200, Ville-Pertti Keinonen wrote: > On Thu, 2004-12-09 at 09:09 +0000, Richard Jones wrote: > > Just an observation here: > >=20 > > The object method seems to be compile-time safe, whereas the hash > > method seems to require run-time checks which could fail. Am I right > > in thinking this? If so, the compile-time safe version is infinitely >=20 > What run-time checks? OCaml is statically typed, it has no run-time > type checking. Only things like array bounds are checked at run-time. > The hash method is typed similarly to the following: [...] I was talking about the use of the Hashtbl. Hashtbl.find can throw a Not_found error at runtime if the environment happens not to contain the required data. This is a sort of runtime check. Rich. --=20 Richard Jones. http://www.annexia.org/ http://www.j-london.com/ >>> http://www.team-notepad.com/ - collaboration tools for teams <<< Merjis Ltd. http://www.merjis.com/ - improving website return on investment http://winwinsales.co.uk/ - CRM consultancy --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBuY+L4le1M6q9pzoRAuaJAJ4mUpVZ4Qi4qFiKhg+IewRVZIjC/QCgi7Rg WGyOcN8FU5ojmOYVvi1GBPQ= =HJOm -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--