Re: Underscores in numbers for legibility
Lassi Kortela 13 Apr 2019 16:10 UTC
> "Any token that is a potential number but does not fit the number syntax
> is a reserved token and has an implementation-dependent interpretation."
You are right. But in practice it seems like the
implementation-dependent interpretation of choice is to read it as a symbol:
;;;; clisp
[1]> (type-of '1000000)
(INTEGER 0 281474976710655)
[2]> (type-of '1_000_000)
SYMBOL
;;;; sbcl
* (type-of '1000000)
(INTEGER 0 4611686018427387903)
* (type-of '1_000_000)
SYMBOL
;;;; ccl64
? (type-of '1000000)
(INTEGER 0 1152921504606846975)
? (type-of '1_000_000)
SYMBOL