New answers tagged


Are there cases in which [backquote] is the best choice Yes, when constructing complex list expressions that involve a lot of quoting, unquoting, and splicing. The best example of this is macro bodies. See the example in (info "(elisp) Defining Macros"): (defmacro t-becomes-nil (variable) `(if (eq ,variable t) (setq ,variable nil))) ...


Quoted values are established at read-time, and so incur no eval-time cost to build. So there ought to be a slight efficiency benefit to using a quoted value in cases where it's safe to do that. It it's a genuinely constant value, then quoting is the best choice. Are there any cases in which list should be avoided? quote returns the same1 value every time,...


list and quote do not function in the same way. list evaluates its arguments, and quote does not: (list 1 2 (+ 1 2)) ; => (1 2 3) (quote (1 2 (+ 1 2))) ; => (1 2 (+ 1 2))

Top 50 recent answers are included