|
|
|
|
|
by psychoslave
748 days ago
|
|
Also Raku, the Perl spin-off, is allowing this. Clojure I guess is taking that from its LISP legacy, where it’s not an issue as you don’t have infix notation. Raku on the other hand, took the decision on the road starting from Perl. If I recall correctly, Raku does let you use infixed dashes as minus into agglutinated numeric literals and operators sequences, like `2-5-7`, but your need spaces to use it as a substraction operator when an identifier is involved like `bare-price - gift-voucher`. That said I never used Raku nor Clojure (or any Lisp), there is just no job opportunity that ever reached me with these kind of non-mainstream programming language. |
|
An ordinary identifier is composed of a leading alphabetic character which may be followed by one or more alphanumeric characters. It may also contain isolated, embedded apostrophes ' and/or hyphens -, provided that the next character is each time alphabetic.
https://docs.raku.org/language/syntax#Ordinary_identifiers
This means that '2-5-7' is NOT an identifier but the numerical value -10.