<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#cccccc" text="#000000">
Peter,<br>
<blockquote cite="mid2A314A53-E254-4631-8A53-7234DBCAA13E@gmail.com"
 type="cite">Roughly, I'd say you can fudge laziness in data structures
in a strict language without too much bother. (I don't have much
experience with this, but the existence of a streams library for OCaml
is the sort of thing I mean. There are plenty of papers on co-iterative
streams and suchlike that show the general pattern.)<br>
</blockquote>
Yes, agree. And this was my initial point.<br>
<blockquote cite="mid2A314A53-E254-4631-8A53-7234DBCAA13E@gmail.com"
 type="cite"><br>
If you wish to add control structures you would need to use the lazy
keyword a lot, e.g.:
  <br>
  <br>
if cond then *lazy* S1 else *lazy* S2
  <br>
  <br>
and for more complicated structures it's not going to be always clear
what needs to be suspended. Laziness is a conservative default here.
(If you want to write an EDSL in a non-lazy language, you'll need to
use some kind of preprocessor / macros / ... - in other words, a
two-level language - or do thunking by hand, as above, or live with
doing too much evaluation.)<br>
One way to gauge how useful laziness really is might be to look through
big ML projects and see how often they introduce thunks manually. A
thunk there is usually something like "fn () =&gt; ..." IIRC. Also
IIRC, Concurrent ML is full of them.</blockquote>
Probably, dealing with macros is not so scary and Paul Graham and Piter
Siebel show that it is quite easy. :-)<br>
<br>
Ok, let's go from the another side:<br>
I have searched through Darcs source and found 17 datastructures with
strict members (for example data Patch = NamedP !PatchInfo ![PatchInfo]
!Patch) and 36 occurrence of this dreaded seq. And Darcs is an
application being not speed critical.<br>
<br>
And if one try to write cipher decoder on Haskell, I guess he has to
make his program full of '!' and 'seq' (or FFI).<br>
<br>
<blockquote cite="mid2A314A53-E254-4631-8A53-7234DBCAA13E@gmail.com"
 type="cite">Dare I say the tradeoff is between a relatively simple
operational model (so you can judge space and time usage easily) and
semantic simplicity (e.g. the beta rule is unrestricted, easing program
transformation).<br>
</blockquote>
Cool! Thank you.<br>
<br>
Best regards,<br>
Nick.<br>
</body>
</html>