4 ms·
> except by most dialects of LISP, which typically use a hyphen character in identifiers and they do not use a minus character, except for the sign of numbers.
by lispm 2y ago
> except by most dialects of LISP, which typically use a hyphen character in identifiers and they do not use a minus character, except for the sign of numbers.
In Common Lisp, there is one character SP10 for Hyphen and Minus: https://www.lispworks.com/documentation/HyperSpec/Body/02_ac.htm https://www.lispworks.com/documentation/HyperSpec/Body/02_ac...
It is used
* in numbers as a sign -> -42
* in a conditional read macro as a minus operator -> #-ARM64(error "This is no 64bit ARM platform")
* in functions as a numeric minus operator -> (- 100 2/3) or (1- 100)
* as a global variable for the currently evaluated REPL expression -> -
* as a hyphen for symbols (incl. identifiers) -> UPDATE-INSTANCE-FOR-DIFFERENT-CLASS