Closed mpontus closed 9 years ago
Yes, it's all a symbol, but they're not the same thing. A symbol can be both, either, or neither. Elisp is not like Clojure, where the two are the same thing.
If we expand the name of a function where a symbol is being used as a variable (or vice versa), then we'd generate invalid code, so we need to watch out for that.
Thank you for your reply.
Did I understand you correctly that without type checking, following case constitute invalid code?
(defvar foo "bar")
(define-namespace ns-
(defun foo ())
(defun baz () (print foo))) ;; => (void-variable baz-foo)
Yes, if Names didn't differentiate functions and variables, that's exactly what would happen. :-)
Bruce, if you don't mind delving into some details, please explain the reason. Isn't it all a symbol after all?