Scheme style and Python style [was: Re: Typed Python?]
Jacek Generowicz
jacek.generowicz at cern.ch
Wed Jul 7 06:13:43 EDT 2004
François Pinard <pinard at iro.umontreal.ca> writes:
> [Jacek Generowicz]
> > François Pinard <pinard at iro.umontreal.ca> writes:
>
> > > Also, there once was a notable distance between Scheme and Python
> > > about lazy evaluation [...] but more recent versions of Python offer
> > > fairly tractable, almost easy approaches for such things.
>
> > [...] what sort of lazy evaluation ?
>
[...]
> In Scheme, lazy evaluation is part the language with the `(delay ...)'
> and `(force ...)' constructs. In Python, one could already "simulate"
> lazy evaluation by various means, but it turned out to be fairly easy
> after iterator generators were introduced, and these are now used all
> over the place in Python, often yielding interesting speedup.
I find non-data descriptors quite useful for lazy evaluation, at times.
I guess it comes down to a difference in what we consider a "notable
distance" to be. Scheme and Python provide different means of built-in
lazy evaluation ... this strikes me as considerably less notable than
the difference between Haskell and Python/Scheme (wtr lazy evaluation).
More information about the Python-list
mailing list