Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 43:59:38 |
Calls: | 422 |
Calls today: | 1 |
Files: | 1,024 |
Messages: | 90,212 |
On Wednesday, April 12, 2023 at 9:41:10 AM UTC-7, James Cloos wrote:
does cl support defining new self-evaluating objects
(other than keywords)?
if so, how?
What sort of "defining" did you have in mind.
One simple answer (for symbols) would be:
(defconstant foo 'foo)
There may be other things you could do via reader macros.
One example of that is https://github.com/lispm/measures [*], which
defined
numbers with dimensions and optional reader macros so that something
like
35km or 18m/s2 would evaluate to equivalent objects, although not in an
EQ sense.
[* Software by Rainer Joswig that I extended while at ISI]