3 ms·
What is your example of a bad default in Clojure, and what should it actually be? Is it the stuff in your grandparent comment? That there should be some bindin
by kazinator 2y ago
What is your example of a bad default in Clojure, and what should it actually be?
Is it the stuff in your grandparent comment? That there should be some binding for x out of the box so that (x 1 2) does something rather than error out?
A lot of mainstream languages use * for multiplication, so that would just be inconsistent.
I also don't agree with your strange requirements where you propose that the character ÷ (U+00F7 division symbol) be used for division, whereas for multiplication you are proposing the plain lower case x letter from ASCII (U+0078).
What you want to pair with ÷ is the actual multiplication symbol × (U+00D7).
Separately from that inconsistency, it's probably a bad idea to introduce one-letter like x into the standard library of a language, particularly one that is Lisp-1 (one namespace for functions and variables).
Those math symbols ÷ and × are both hard to type (does not appear on keyboards and not supported nicely by common input methods) and easily confused for x.
> We need opinionated developers
Okay: Programming languages should stick to ASCII, get off my lawn.
Supporting Unicode in identifiers is fine: give that to the application programmers to use in their programs, if they are so inclined, but for Pete's sake, keep it out of the language and libraries.
(Some Lisp authors disagree; for instance, there is support for lambda being written using the actual Greek symbol in some Lisps.)