[Python-ideas] One more time... lambda function <--- from *** signature def.

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Mar 5 22:51:13 CET 2014


Masklinn wrote:
> On 2014-03-04, at 23:31 , Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
>>But Algol has the benefit of static typing 
> 
> That's not really a blocker though, Haskell thunks are implicit and not
> type-encoded. A name may correspond to a (unforced) thunk or to a strict
> value

That comes at the expense of making *everything* a thunk
until its value is needed. This would be a big, far-reaching
change in the way Python works.

Also, Haskell has the advantage of knowing that the value
won't change, so it can replace the thunk with its value
once it's been calculated. Python would have to keep it
as a thunk and reevaluate it every time.

And Haskell doesn't have to provide a way of passimg the
thunk around *without* evaluating it.

-- 
Greg


More information about the Python-ideas mailing list