Comment by jhgb
4 years ago
Depends on what you mean by "reserved word". In Common Lisp, you can define your own cons and defun, provided that you're not attempting to mutate the respective symbols from the COMMON-LISP package. That can be achieved by either defining your own cons and defun and shadowing the cons and defun from the COMMON-LISP package (typically for function or macro bindings), or just straight up using cons and defun from the COMMON-LISP package in "legal" ways - for example (let ((cons 1) (defun 2)) (list cons defun)) is legal and evaluates as '(1 2) since using those two symbols as names for lexical variables doesn't break the running Lisp in any way. In the former case (of defining your own functions/macros accessed as "unqualified" cons or defun from your own code) it's up to you if you consider cons and defun to be "reserved words" based on their package or not (packages for reserved words being something that languages explicitly recognizing the concept of a reserved word don't seem to have, so it's not clear how this should qualify). In Scheme, a Lisp-1, it's kind of free-for-all, especially in R5RS where you don't even have to bother with hiding standard bindings.
No comments yet
Contribute on Hacker News ↗