Talk:Defunctionalization

Latest comment: 12 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