4 ms·
> The very fact that you must write (function sin), or #'sin, or use funcall is a way that it treats functions differently than normal values. Since it requires
by flavio81 9y ago
> The very fact that you must write (function sin), or #'sin, or use funcall is a way that it treats functions differently than normal values. Since it requires some amount of extra though and/or typing, this often seen as a bad thing.
What a silly thing to say.
The reason you need to put "#'" in Common Lisp to indicate that you are referring to a function, is because in CL functions have their own namespace. So "#'" tells Lisp that you are referring to a symbol that is inside the function namespace. Otherwise, no "#'" and Lisp will look at it on the regular namespace.
Conversely, if you prefix a symbol with ":", such as in ":this :that :foo :bar", the ":" means that this symbol resides on the keyword namespace.
Thus, in Common Lisp you can have a function named "foo", a variable named "foo", a keyword named "foo" as well with no conflict.
It has NOTHING to do with functions being or not being "first class citizens".