Version française
Home     About     Download     Resources     Contact us    
Browse thread
Efficiency of let/and
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Chabr <martin_chabr@y...>
Subject: Ant: Re: Ant: [Caml-list] Efficiency of let/and
Yes, you are right. Shame on me. I must have had a
bounding for y from an earlier experiment. When I
restart the interpreter, so that it is in a virgin
state, I get the same error message about unbound y as
you.

Martin

--- William Lovas <wlovas@stwing.upenn.edu> schrieb:

> On Mon, Sep 26, 2005 at 06:32:40AM +0200, Martin
> Chabr wrote:
> > As it appears to me, there is no semantic
> difference
> > between both alternatives. It can be shown with
> two
> > dependent expressions y = 1 and z = y + 2:
> 
> This is not universally true:
> 
> > # let y = 1
> >   and z = y + 2 in
> >   z;;
> > - : int = 3
> 
>             Objective Caml version 3.08.1
> 
>     # let y = 1
>       and z = y + 2 in
>       z;;
>     Unbound value y
> 
> So either you are using a version older than 3.08.1
> or this is a fairly
> recent change.  In the latter case, people who wish
> to remain backward-
> compatible might eschew this style for sequential
> bindings, regardless
> of any potential performance problems.
> 
> William
> 
> _______________________________________________
> 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
> 


Martin Chabr
Hochstrasse 28
8044 Zürich
Schweiz / Switzerland
Tel.P.: 01-261 17 24


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de