Google Groups Home
Help | Sign in
partial evaluation / higher order functions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Didier Verna  
View profile
 More options 24 Jun, 12:55
Newsgroups: comp.lang.functional
From: Didier Verna <did...@lrde.epita.fr>
Date: Tue, 24 Jun 2008 13:55:35 +0200
Local: Tues 24 Jun 2008 12:55
Subject: [RFC] partial evaluation / higher order functions

       Hi,

we know the notion of 1st class object, which, applied to functions
means things like being able to give functions as other
functions'arguments, return functions, aggregate them, using them
literally and so on.

What about partial application and the fact that if you define "f a b",
them "f a" also denotes a function that you can later apply to another
argument? Would you say that this is one of the caracteristics of
functions being 1st class objects, or rather that it is a /consequence/
of that?

Since partial application is very function-specific (as opposed to
concepts like litteral manipulation or function arguments/return
values), I'm reluctant to consider it as a higher order characteristic,
but I'd like other opinions.

--
5th European Lisp Workshop at ECOOP 2008, July 7: http://elw.bknr.net/2008/

Didier Verna, did...@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (0)1 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (0)1 53 14 59 22  did...@xemacs.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Wooding  
View profile
 More options 24 Jun, 23:13
Newsgroups: comp.lang.functional
From: Mark Wooding <m...@distorted.org.uk>
Date: Tue, 24 Jun 2008 22:13:47 +0000 (UTC)
Local: Tues 24 Jun 2008 23:13
Subject: Re: [RFC] partial evaluation / higher order functions

Didier Verna <did...@lrde.epita.fr> wrote:
> What about partial application and the fact that if you define "f a b",
> them "f a" also denotes a function that you can later apply to another
> argument?

Partial application is not at all the same as partial evaluation.  The
former is a language feature which makes certain kinds of programs more
concise.  The latter is a kind of compiler optimization.

> Would you say that this is one of the caracteristics of functions
> being 1st class objects, or rather that it is a /consequence/ of that?

Consider Scheme here.

-- [mdw]


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Torben Ægidius Mogensen  
View profile
 More options 25 Jun, 09:16
Newsgroups: comp.lang.functional
From: torb...@pc-003.diku.dk (Torben Ægidius Mogensen)
Date: Wed, 25 Jun 2008 10:16:36 +0200
Local: Wed 25 Jun 2008 09:16
Subject: Re: [RFC] partial evaluation / higher order functions

Didier Verna <did...@lrde.epita.fr> writes:
> What about partial application and the fact that if you define "f a b",
> them "f a" also denotes a function that you can later apply to another
> argument? Would you say that this is one of the caracteristics of
> functions being 1st class objects, or rather that it is a /consequence/
> of that?

Partial application is not really different from full application when
you look underneath the syntactic sugar.  A function

  f a b = e

is really a shorthand for

  f = \a->\b->e

So you define a function that takes a value a and returns another
function that takes a value b and returns a value (which may or may
not be another function).

So, if you can define functions that return functions, you have the
ability to do partial applications.  So I would say that partial
application is a consequence of first-class functions.  You might not
always have as nice a syntax as the above, though.

        Torben


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google