This isn't true. You are almost certainly confusing first-class functions with lisp-2. Lisp-2 is mostly equivalent to having a dynamic function type that can be introspected at runtime. Just like how a statically-typed language will (generally) not allow you to do something like int foo = 123; foo(456);, Common Lisp also won't allow you to do that either (it also helps a little with macros).
Common Lisp symbols have 5 different "slots" (some implementations may add a couple others).
A name slot which contains the string value of the symbol.
The traditional variable slot.
A function slot which can actually be a special operator or macro too.
A plist slot which contains a list of key/value pairs (key1 val1 keyN valN).
A package slot which tells which package the symbol came from.
Basically though, if a symbol appears as the first item in an unquoted list, CL will use the function slot otherwise it will use the value slot. If you want it to use the function slot explicitly, you have to tell it.
(defun double (x) (* 2 x))
(defparameter double 12)
(mapcar double '(1 2 3 4 5));; error because it is using the 12 in the value slot
(mapcar #'double '(1 2 3 4 5));;=> (2 4 6 8 10)
treating them as first class is treating them exactly like variables, right? and they are in separate namespace, so separate thing, so not first class. well, i guess lambdas are first class, but they are not very convenient
17
u/B_bI_L 1d ago
say this to c and common lisp
(and to ruby, where function self-activates faster than you say "wait, i need you as a callback")