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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <Pierre.Weis@i...>
Subject:
> On Thu, 12 Oct 2000, Pierre Weis wrote:
> 
> > [...]
> > > > As I mentioned earlier, when teaching, it's nice for 
> > > > a language to be simple and uniform.  Explaining to
> > > > a student why:
> > > > 
> > > > 	let x = input() in
> > > > 	let y = input() in
> > > > 	(x,y)
> > > > 
> > > > is not equivalent to:
> > > > 
> > > > 	(input(), input())
> > > > 
> > > I wonder if former is guaranteed to be equivalent to:
> > > let x = input () 
> > > and y = input () in
> > > (x, y)?
> > > 
> > > -- 
> > > mailto:malc@pulsesoft.com
> > 
> > Hi,
> > 
> > Thank you for your interest for the Caml mailing list.
> > 
> > Unfortunately, I don't understand your message; I suspect there is a
> > misspelling in it; are you sure your message is correct ?
> > 
> > I haven't bounce it to the Caml users. I would like you to
> > double-check it before!
> > 
> > If you want you can send be a new and corrected message I will be glad
> > to send it to the rest of the Caml user.
> Uh. Though one, spell check went without probs, so it must be semantic
> problem, ok. What i wanted to know is whether in:
>  let exp1 and exp2 and exp3
> exp1 exp2 exp3 will be evaluated one by one in the order they are present
> in the code (being equal to let exp1 in let exp2 in let exp3).
> 
> -- 
> mailto:malc@pulsesoft.com

Oups! I didn't notice the and!

The answer to your question is no. In let x = e1 and y = e2 the order
of evaluation between e1 and e2 is not specified, whereas it is
specified for let .. in let .. in. Hence the two programs are not
equivalent.

So, would you like me to send your original question to the list ?

(Sorry for the misunderstanding)

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/

</quote>

Looks like it didnt made it into the list.

-- 
mailto:malc@pulsesoft.com

-------------------
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