[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to quote a list of functions?

From: Emanuel Berg
Subject: Re: How to quote a list of functions?
Date: Wed, 19 Aug 2015 02:29:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Drew Adams <address@hidden> writes:

>> when and why are functions refered to not using
>> symbols to designate them?
> Anonymous functions.

Those have been mentioned many times by now.
What about them? If you mean lambdas I have used them
for many years with no use of any sharp notation.

> 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)'.


> 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.

It is clear that functions and symbols are different
things but it is not clear what you would gain by
sometimes referring to functions as functions and
sometimes by the symbols denoting them, and it is
especially confusing as the "function as function" way
of referring to them requires a special syntax compared
to referring to everything else in Lisp! And this is
also tedious as every time a function is refered to
you have to verify with the function called what it
expects - a function, or a symbol denoting a function?
If I did this, I would not have any special syntax for
referring to a function, much like I don't want special
syntax for, say, a variable that holds an integer
compared to a variable that holds a string:

    (format "%s, you have %d credits on you Galatica Bank account"
            i'credits )

Instead, what I would do, I would change the functions
to have verification of input data and act
accordingly, if it received a "function function" or
"function as symbol" - not that that ever matters as
the symbols works just as well, which makes this even
more bizarre a discussion!

Nonetheless, I always want to do things the right way
so I'll change my code. If I find anything apart from
the three cases I've brought to the attention of this
list, I'll mention those as well.

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]