3 ms·
Though one can use whitespace in Common Lisp identifiers, by quoting symbols: CL-USER 115 > (let ((first| |number 10) (second\ number 2
by lispm 8y ago
Though one can use whitespace in Common Lisp identifiers, by quoting symbols:
CL-USER 115 > (let ((first| |number 10)
(second\ number 20))
(+ first\ number |SECOND NUMBER|))
30
- m48 8y agoOh, I never noticed that. That's pretty interesting—although unfortunately, that syntax does not look terribly convenient to write, which is the main thing I'm after here. I think the best way to get identifiers with whitespace to work in a Lisp would be contrive a syntax for S-expressions that uses something other than whitespace to separate things. Perhaps letting (first rest-1 rest-2 ...) be written as as (first: rest 1, rest 2, ...) or (first, rest 1, rest 2, ...), so that example could be written as: (let: ((first number: 10), (second number: 20)), (+: first number, second number)) I imagine it would be possible to write a macro in Common Lisp to transform this into runnable code, or a language in Racket to do so—although, I'm not sure how many people would actually want to make or use something like this.