Dougal,Of course, I meant "kettle" that should be put on the fire. I was not intended to singe poor cows for a cup of tea.:-DAccording to one guy's analogy: the Real World is strict - in order to drink tea, you have to put the cattle on the fire, wait until water boils, brew tea and then drink. Not the cattle is put on the fire, water boils and the tea is brewed when you take the empty cup to start drinking. :-)I think the word you meant there is "kettle", since "cattle" are what get turned into burgers ;-) Still, the idea of water-boil-tea-brew happening by demand would probably save electricity in our energy-conscious world. Don't boil a full kettle for a single cuppa! And to continue this analogy: when we decide to drink tea, we run the algorithm (water-boil-tea-brew) from begin to end strictly and imperatively. We resolve the dependencies water -> ... -> brew only the first time at the stage of "designing" the algorithm (by means of reasoning and common sense), but after finishing the "design" we can just run it unbounded times for any amount of tea. :-) Well, as I understood, for your way of thinking lazy language is more suitable. I see, this is good motive for you (or people like you, I guess you have solid mathematical background or something like that) to choose Haskell or other language with default laziness, but the question in general remains open...The question is the following: how big the gap between strict languages with lazy constructs and Haskell? Does the default lazyness have irrefutable advantage over default strictness?That kinda leads into thoughts of the Turing tar-pit, where everything is possible but hopelessly obfuscated by the constraints of the language.I think default laziness, to answer your actual question, has advantage in terms of thought process. It helps me consider things in terms of dependencies. To go back to the analogy: in the strict style it's very easy to boil the kettle and then let the water go cold. This is a waste of energy (CPU time, or whatever). So whether it's *computationally* more valuable, I don't know. But I find that it helps me to order my thoughts about what a problem *needs*. Thank you for the answer. Best regards, Nick. |
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe