• Re: defining self-evaluating objects

    From HenHanna@HenHanna@dev.null to comp.lang.lisp,comp.lang.scheme on Mon Oct 21 22:36:08 2024
    From Newsgroup: comp.lang.scheme

    On Thu, 13 Apr 2023 1:15:33 +0000, Tom Russ wrote:

    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]


    Do we have Defconstant in Scheme ???
    --- Synchronet 3.22a-Linux NewsLink 1.2