Re: The compilation approach in modern languages

Tony Finch <dot@dotat.at>
18 Feb 2005 22:48:59 -0500

          From comp.compilers

Related articles
[7 earlier articles]
Re: The compilation approach in modern languages nmm1@cus.cam.ac.uk (2005-02-16)
Re: The compilation approach in modern languages boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-02-16)
Re: The compilation approach in modern languages boldyrev+nospam@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-02-16)
Re: The compilation approach in modern languages rbates@southwind.net (Rodney M. Bates) (2005-02-16)
Re: The compilation approach in modern languages gneuner2@comcast.net (George Neuner) (2005-02-16)
Re: The compilation approach in modern languages torbenm@diku.dk (2005-02-18)
Re: The compilation approach in modern languages dot@dotat.at (Tony Finch) (2005-02-18)
Re: The compilation approach in modern languages hannah@schlund.de (2005-02-18)
Re: The compilation approach in modern languages boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-02-18)
Re: The compilation approach in modern languages jle@ural.owlnet.rice.edu (2005-02-20)
Re: The compilation approach in modern languages gneuner2@comcast.net (George Neuner) (2005-02-28)
Re: The compilation approach in modern languages anton@mips.complang.tuwien.ac.at (2005-02-28)
Re: The compilation approach in modern languages gneuner2@comcast.net (George Neuner) (2005-03-01)
[3 later articles]
| List of all articles for this month |

From: Tony Finch <dot@dotat.at>
Newsgroups: comp.compilers
Date: 18 Feb 2005 22:48:59 -0500
Organization: dotat labs
References: 05-02-053 05-02-056 05-02-065 05-02-076
Keywords: interpreter, code
Posted-Date: 18 Feb 2005 22:48:59 EST

"Rodney M. Bates" <rbates@southwind.net> wrote:
>Tony Finch wrote:
>>"Rodney M. Bates" <rbates@southwind.net> wrote:
>>>
>>>The one exception is the functional languages, where functions can be,
>>>in effect, manipulated at runtime and then evaluated. ---
>>
>>That is not true for most modern functional programming languages
>>(i.e. ones not descended from lisp) which are designed to be compiled
>>to native code.
>
>I would expect many implementations to do some runtime partial
>evaluation when a curried function is partially applied. Does
>it never happen? I am sure this is sometimes more than an
>efficiency issue. Seems like it could affect termination,
>for example.


The usual implementation is that the partial application is converted
into a thunk which, when the remaining arguments are provided, calls
the function with all the arguments. If the partial application's
argument is statically constant then it may be partially evaluated at
compile time. The implementation cannot not have any effect on
termination, because that would be a bug.


Tony.
--
f.a.n.finch <dot@dotat.at> http://dotat.at/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.