help-gnu-emacs
[Top][All Lists]
Advanced

[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 01:46:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"Pascal J. Bourguignon" <pjb@informatimago.com>
writes:

> Yes, you should think about the type of the objects
> you pass to functions.

Ha! Indeed. What I mean is, why is it at all
beneficial to anyone to have this distinction "symbol
to denote function" vs. function at play at the level
of the programmer? Why sometimes refer "indirectly" to
the function by using the symbol denoting it (a very
direct way IMHO), and why sometimes refer to the
actual function?

>> And again, when and why are functions refered to
>> not using symbols to designate them?
>
> When you use themselves to refer to themselves.
>
> (let ((f (symbol-function 'sin))) (funcall f (/ pi
> 3))) --> 0.8660254037844386
>
> You are gaining that you can manipulate functions,
> have anonymous functions, write high order
> functions, etc.

I don't know exactly what you mean by "manipulate
functions" (code that is modified on the fly, e.g.
swapped operands around operators in parse trees?) -
but the other stuff is possible to do the old
fashioned way. Or are you talking on the level of Lisp
itself? If so, I'm not saying anything about that.
I'm saying the sharp quote notation what I have seen
so far doesn't bring anything to the table save for
compiler warnings which you certainly can do without
if you otherwise aren't benefited from it and/or
simply don't like it.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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