6 ms·
This book won't be a very strong ally against the stereotype of the elitist Lisper... "Notice how the text we enter is in lower-case but the text returned from
by Hexstream 18y ago
This book won't be a very strong ally against the stereotype of the elitist Lisper...
"Notice how the text we enter is in lower-case but the text returned from lisp is in upper-case. This is a feature of COMMON LISP that allows us to easily scan a REPL print-out and know which expressions we entered versus which were printed out by lisp."
Ah, I always thought it was a bug graciously bestowed by our ancestors.
- coffeemug 18y agoNot to mention that CL reader can be configured to have any kind of case behavior you want, and turning symbols to upper case just happens to be the default.
- Hexstream 18y agoI'm aware of that but I've always been wary of doing (setf print-case :downcase) globally because it can break code. Consider this example: (let ((*print-case* :downcase) (my-symbol 'mine)) (intern (format nil "IT-IS-~A" my-symbol))) => |IT-IS-mine|, :INTERNAL Let's say print-case has been setf'd globally and my-symbol is an argument to a macro. The macro wants to derive a new symbol from my-symbol. But the result is ugly because the macro assumed print-case :upcase. There are many such examples in my and other people's code. edit: How do I prevent asterisked variable names from indicating italics?