Skip to content

Special Variables

Hi, I just saw your very cool library requested for quicklisp. I tried it out and noticed some oddities. I will make them separate issues to make it easy to keep track of each one.

Oddity 1: *earmuffs* is meant to indicate a special variable. Even thought you do use defparameter and defvar internally, it is bound to a gensym not the symbol itself.

Correct me if I'm wrong, but I beleive that this would be incorrect:

(defpvar *cat* #p"~/cat.clcl" 0)

(defun fiddle-cat ()
  (print *cat*))

(defun dittle-cat ()
  (let ((*cat* 10))
    (fiddle-cat)))

(dittle-cat)

If *cat* is a special variable (indicated by earmuffs) then this should result in 10. I see no sane way for a persistent variable to be scoped dynamically, so I would suggest using global-vars instead of deparameter and defvar.