On Wednesday, April 12, 2023 at 9:41:10rC>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]
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 54:57:23 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
3 files (2,684K bytes) |
| Messages: | 285,585 |