<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">...Anyway, I can't help but think that there might be a happy medium<br>between eager and lazy evaluation.
</blockquote><div><br>What I'd love to see is the compiler continue to be call-by-need, but be smart enough to recognize when multiple expressions will all eventually need to be evaluated. A simple example:<br><br> show (a + b)
<br><br>(+) requires *both* 'a' and 'b' be evaluated to show the result, not 'a' *then* 'b'. It'd be great if the compiler can seek out any shared lazy data structures in evaluating 'a' and 'b', and start computing them both with one element at a time.
<br><br>Has anyone put any thought into something like this?<br><br>Thanks,<br>Greg<br><br><br><br><br> </div><br></div><br>