[Haskell-cafe] Re: New slogan for haskell.org

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Thu Nov 29 16:57:38 EST 2007

Yitzchak Gale writes: 

> Python's "iterators" are not the same as iterators in C
> and other older languages. They are lazy lists. The reason
> they named them "iterators" is not to scare people. 
> Haskell was not the first to have lazy lists, but Haskell
> was an important part of the inspiration for introducing
> them into Python.

Actually, I would *sincerely* like to see some reference proving that. 

I cite Guido V.R., 2005:
 "About 12 years ago, Python aquired lambda, reduce(), filter() and
  map(), courtesy of (I believe) a Lisp hacker who missed them and
  submitted working patches."

Give to Caesar...: It was Amrit Prem; one history page on WP says that
no specific mention of any Lisp heritage is mentioned in the release
notes at the time, so all speculations are still possible... 


But, in fact, Python iterators - in general - are neither lazy nor lists.
No linking!
They are syntactic shortcuts to *objects* possessing the method 'next'.
So, there is no call by need, no updated thunks, etc. Calling them lazy
is an abuse of the language, although quite intuitive. I don't want to raise
a war about that... 

The laziness, meant as deferred procedure calls *CAN* be used in Python,
also in iterator context, through generators, that's true. But still there
are no update'able automatically thunks, no lazy data! If generators remind
me of something, it is co-routines. 

BTW. The BDFL Van Rossum never said anything about "scaring". He said
plainly that folds are things he *hates* most. 

> Guido was forced to do something - someone had written
> a new Python interpreter, called "Stackless Python",
> in which every Python function was a Scheme-like continuation.
> People found this very, very scary. So Guido stopped
> it by introducing laziness, which could be made much
> less scary.

Give to Caesar...
Someone, was Christian Tismer: 


and I am doubtful about the statement that people found it very, very scary. 
Simply they - usually - felt no *need* for another complication to learn,
you know, *some* people are lazy... But Stackless still exists, GVR
stopped nothing, and the Grant Olson's tutorial 


is really interesting, although perhaps, as usual, not for Andrew Coppin. 

People, stop using this damned word: "scare" in the context of *learning*

Jerzy Karczmarczuk 

More information about the Haskell-Cafe mailing list