Re:C++ Modules Might Be Dead-On-Arrival
by lispm on Monday January 28, 2019 @03:12PM
(#19020625)
Though one can use whitespace in Common Lisp identifiers, by quoting symbols:
[ Parent
| on HN ]
Oh, 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.