4 ms·
The standard Common Lisp namespaces I can count off the top of my head are variables/symbol macros, functions/macros, compiler macros, types/classes/condition t
by phoe-krk 6y ago
The standard Common Lisp namespaces I can count off the top of my head are variables/symbol macros, functions/macros, compiler macros, types/classes/condition types, class slots, TAGBODY tags, BLOCK names, THROW tags, restarts, documentation types. Users can easily define new ones.
- dreamcompiler 6y agoAnd types and classes are subtly different namespaces BTW. Try specializing a method on KEYWORD. In pure ANSI implementations you can't because KEYWORD is a type but not a class, and method specializers have to be classes.
- phoe-krk 6y agoYes, but defining a class always defines a matching type - hence they share a namespace in a way.
- deleted 6y ago[deleted]
- dan-robertson 6y agoI’m not sure I’d count compiler macros as a separate namespace to functions or macros. It feels like they’re the same to me. I think I also wouldn’t count throw tags as a namespace as they can be objects rather than symbols (but then again lists like (setf foo) are valid function names). I think method combinations and packages are other namespaces.
- phoe-krk 6y agoYes - thank you for the additional namespaces and about the THROW tag correction. As for compiler macros, they do have their separate namespace, accessible via the `compiler-macro-function` function. They can be invoked instead of functions, but they exist completely on their own.