Delayed evaluation of expressions [was Re: Time we switched to unicode?]

Rustom Mody rustompmody at gmail.com
Wed Mar 26 13:57:52 EDT 2014


On Wednesday, March 26, 2014 11:02:04 PM UTC+5:30, Rustom Mody wrote:
> On Wednesday, March 26, 2014 9:35:53 PM UTC+5:30, Steven D'Aprano wrote:
> > On Wed, 26 Mar 2014 00:30:21 -0400, Terry Reedy wrote:
> > > One passes an unquoted expression in code by quoting it with either
> > > lambda, paired quote marks (Lisp used a single '), 

> > Passing *strings* and *functions* is not the same as having compiler 
> > support for delayed evaluation. At best its a second-class work-around. 
> > Contrast:

> Once the language has lambda, most else can be fashioned
> See the classic papers 
> lambda the ultimate imperative
> lambda the ultimate declarative
> lambda the ultimate goto
> at here http://library.readscheme.org/page1.html

<Details of Jensen implementation snipped>

Which I should have summarized as: lambda is the essential Delay operator.

So much so that in scheme

thaw and freeze are defined as

(using pseudo-python syntax)

def thaw(x) : return x()

freeze(x) is a 'special-form' (aka macro) such that

freeze(x) ≡ lambda : x



More information about the Python-list mailing list