[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to quote a list of functions?
From: |
Drew Adams |
Subject: |
RE: How to quote a list of functions? |
Date: |
Mon, 17 Aug 2015 18:54:22 -0700 (PDT) |
> when and why are functions refered to not
> using symbols to designate them?
Anonymous functions.
http://www.gnu.org/software/emacs/manual/html_node/elisp/Anonymous-Functions.html
In Emacs Lisp, a named function is named by a symbol.
In Common Lisp, a named function is named by either a symbol
or a list of the form `(setf SYMBOL)'.
http://clhs.lisp.se/Body/26_glo_f.htm#function_name
> Isn't the most natural way to refer to a function (or
> anything else) just to type its name?
Natural? Please take a poll of the biomass, and get back to us.
> What are we gaining from having people and not
> computers deal with this distinction?
A function has other aspects (signature, in particular),
besides it name.
Just as a symbol has aspects (variable value, plist) other
than its name and its function value.
What do we "gain" by such distinctions?
The distinctions are not just mental constructs; they are
real - real distinctions wrt behavior.
In the case of people, it's observable behavior that we
care about. We typically don't care about all of the
computer-level behavior. But we do care about behavior
distinctions because we make use of them.
We can make _use_ of the different aspects of functions,
symbols, whatever. You ignore such differences at your
own peril. Or to be less dramatic: it's your loss.
Ignoring that there are different aspects means ignoring
what a Lisp function (or symbol or whatever) _is_, which
also means ignoring what it can be used for and how it
can be used.
In Lisp, in particular, you can treat `(lambda (x) (* x 2))'
as a list, in addition to treating it as a function. It
has different behaviors depending on what you do with it.
Likewise, a symbol such as `car'. Now it's a function;
now it's a variable; now it's neither; now it's an object
with a plist attribute.
Lisp lets you have your cake and eat it too. If you
don't want to eat it, that's up to you.
- Re: How to quote a list of functions?, (continued)
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/16
- Message not available
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/16
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/16
- Message not available
- Re: How to quote a list of functions?, Barry Margolin, 2015/08/16
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/16
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/17
- Message not available
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/17
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/18
- Message not available
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/16
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/17
- RE: How to quote a list of functions?,
Drew Adams <=
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/18
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/18
- RE: How to quote a list of functions?, Drew Adams, 2015/08/18
- Re: How to quote a list of functions?, Emanuel Berg, 2015/08/20
- Message not available
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/18
- Re: How to quote a list of functions?, Stefan Monnier, 2015/08/18
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/19
- get all functions (was: Re: How to quote a list of functions?), Emanuel Berg, 2015/08/20
- Message not available
- Re: How to quote a list of functions?, Rusi, 2015/08/18
- Message not available
- Re: How to quote a list of functions?, Pascal J. Bourguignon, 2015/08/18