Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21c3eb7281dcf79

Jump to content

Talk:Defunctionalization

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 14 years ago by Colin Barrett in topic cons not higher order?

Lambda lifting

[edit]

I don't think lambda lifting (closure conversion) should be merged into defunctionalization. As this article now explains, lambda lifting is a necessary precursor to defunctionalization in some situations (when function abstractions can reference escaping variable). But these are distinct transformations, and there are situations when you can perform defunctionalization without lambda lifting (i.e., when variables do not escape in the first place), just as you can perform lambda lifting without defunctionalization. Noamz (talk) 14:50, 22 November 2009 (UTC)Reply

Lambda lifting is also used in many cases as an implementation technique for functional languages independently of defunctionalization (for instance, it was used by most compilers for lazy languages before GHC, and even nowadays some new compilers, such as UHC, still perform lambda-lifting). I also vote against the merger proposal, and I'm notifying its author to ask why he proposed it. --Blaisorblade (talk) 18:38, 10 November 2010 (UTC)Reply

cons not higher order?

[edit]
We defunctionalize by replacing all higher-order functions (cons and o) with a value of the Lam datatype

cons doesn't appear at first glance to be higher order to me, unless we're talking about having 3 arguments, i.e. its signature can be written as a -> ([a] -> [a]) --Colin Barrett (talk) 05:09, 28 March 2012 (UTC)Reply