[stack] Laziness
"Ruurd" <[email protected]> Sun, 23 May 2010 08:23:18 -0000
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
The discussion is partly about what laziness is and partly about whether the language supports it as the default evaluation mechanism. Haskell is lazy, Ocaml is strict. That is why Haskell is 9 times slower than Ocaml: http://www.cubbi.com/fibonacci.html The discussion is not about performance, but it does show that laziness comes with a price. Using lazy constructs in a strict language also comes with a price. Now it is the programmer who has to set up the construct, everywhere he needs it. By capturing data in a quotation Joy already offers lazy constructs. Of course, it is now up to the programmer to decide when and where the data is needed. Now the programmer can not be lazy. --- In [email protected], Don Groves <dgroves@...> wrote: > > > --- In [email protected], "William Tanksley, Jr" > > <wtanksleyjr@> wrote: > >> > >> pml060912 <pml540114@> wrote: > >>> "William Tanksley, Jr" <wtanksleyjr@> wrote: > >>>> Laziness is one of the things that can't easily be imported to a > >>>> concatenative language. > > It seems to me that laziness can be implemented simply by > encapsulating all data in functions. If a particular function > is not called, that data is not evaluated. What am I missing? > > don >