From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA04171; Tue, 20 Jan 2004 19:55:12 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 TAA04098 for ; Tue, 20 Jan 2004 19:55:11 +0100 (MET) Received: from nemerle.org (lilith.ii.uni.wroc.pl [156.17.4.7]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i0KItAv19478 for ; Tue, 20 Jan 2004 19:55:11 +0100 (MET) Received: from malekith by nemerle.org with local (Exim 4.24) id 1Aj11p-0005L9-KD for caml-list@inria.fr; Tue, 20 Jan 2004 19:55:09 +0100 Date: Tue, 20 Jan 2004 19:54:45 +0100 From: Michal Moskal To: Ocaml Mailing List Subject: Re: [Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch Message-ID: <20040120185445.GA26921@roke.freak> Mail-Followup-To: Ocaml Mailing List References: <20040116093454.GA23909@redhat.com> <200401192345.10735.exa@kablonet.com.tr> <20040120173423.GA19476@roke.freak> <200401201952.56605.exa@kablonet.com.tr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401201952.56605.exa@kablonet.com.tr> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 2004:99 eray:01 ozkural:01 2004:99 haskell:01 michal:01 moskal:01 malekith:01 kernel:01 semantics:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Jan 20, 2004 at 07:52:56PM +0200, Eray Ozkural wrote: > On Tuesday 20 January 2004 19:34, you wrote: > > Haskell is lazy, ocaml is strict. Consider following snippet of > > ``ocaml'': > > > > let _ = f (x) > > where x = g () > > > > Now, the reader of the code might take false impression that f() is > > executed before g(). Of course there is no such danger with function > > definitions in where blocks, but still I think readability is the reason > > it is absent from ocaml. > > Such a reader would be equally confused by let blocks. The order of execution > is hardly the concern here. let _ = let x = g () in f (x) First execute g(), then f(), plain and simple. This may sound a bit heretic here, but this is how most programmers think about program execution -- first do this, then do that. Even more -- this is how ocaml works. > I don't think the problem you mention has much to do with where syntax. Its > semantics is quite independent of evaluation strategy! Yes, of course you can have well defined semantic for any string of characters. But that's not the point. You say it's more readable -- you're probably right. I say it *can* be confusing. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners