operators, as a way to avoid making some mistakes that are (at least for me) really annoying.
Everything start because I was mixing asignment (=) with equality (==),
probably a common mistake. By chance I saw a video about APL, and after some research I thought that maybe my problem was a notation problem.
What I am doing
whenever I saw an assignment I was reading “x equals …”. It was my mistake,
but the notation wasn’t helping.
So now I use the symbol `←` (U+2190 Leftwards Arrow) to indicate an assignment
The customary recommendation is use strict equality (===),
but 3 symbols take too much space, so now I use the `≡` symbol (U+2261 Identical to)
switch and case
The switch statement looks like a list (to me), and I think is natural to use an arrow when enumerating, so I use the `🝘` (U+1F758 Alchemical symbol for pot ashes, the idea of this one come from the movie ‘bandersnatch’) and `➜` (U+279C Heavy round-typped rightwards arrow)
array push and pop
Push and pop, are somewhat difficult to parse, so I use `↧` (U+21A7 Downward Arrow from Bar) for push, and `↥` (U+21A5 Upwards Arrow from Bar) for pop.
I alway use map, and `↦` (U+21A6 Rightwards Arrow from Bar ) is easier to spot than a word.
I think that `λ` (U+03BB Greek Small Letter Lamda ) is more easier to spot than the word function (and take less space)
My keyboard has the symbol `↲` (U+21B2 Downwards Arrow with Tip Leftwards) in the
return key, so it seems a good idea:
array filter and element
For array filter I use `σ’ (U+03C3 Greek Small Letter Sigma), and for element
`∈` (U+2208 Element Of)
With an arrow function is more easier to parse
The symbol for the arrow function is `⇒` (U+21D2 Rightwards Double Arrow)
A function example
An arrow function example
At least for me is easier to read symbols than words, I tried adding comments (function signatures) but is not the same (with symbols I can scan the code really fast).
The best part is, thanks to Emacs, this aesthetic change not have any effect in the source code(and I can turn on-off the changes fast).
Cheers and happy coding
displaying sequences of characters as fancy characters or symbols
 Notation as a tool of thought
By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases the mental power of the race.
- Equality (==)
- Inequality (!=)
- Identity / strict equality (===)
- Non-identity / strict inequality (!==)
- Greater than or equal operator (>=)
- Less than or equal operator (<=)