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: Brian Hurt <bhurt@s...>
Subject: Efficiency of let/and

Say I have two variables I want to set- variable a to the value expr1 and 
variable b to the value expr2.  The two expressions are pure (no side 
effects), and neither one depends upon the other (neither expr1 nor expr2 
contain either a or b as a value), so they can be evaluated in either 
order or in parallel with no harm.  With expressions like these, I've 
gotten into the habit of using let/and to express the parallelism, that is 
I go:

 	let a = expr1
 	and b = expr2
 	in
 	...

rather than:
 	let a = expr1 in
 	let b = expr2 in

So my question is: is there any value (other than the documentation value) 
in doing this?

Just wondering.

Brian