|
|
|
|
|
by chavesn
1073 days ago
|
|
The ligatures are really interesting, but at a glance I process them so much slower than the raw characters, especially the ones that change the graphical semantics such as <= vs ≤. Does anyone have experience getting used to these and 1) does it end up faster? 2) once you are used to it is it harder than it was before to process the raw characters when reading code in fonts that don't have the same ligatures? |
|
A ligature happening is kind of a "syntax affordance" saying that the code is correct, and it indeed says "!=" and not "! =". It kind of helps my brain elevate the code from "sequences of characters" to "serialised syntax tree".
The fact that the "not equals" operator is the exclamation mark followed by an equals sign is purely an artefact of the practicality of keyboard input. Ligatures are a simple way of stepping away from the raw text and into the meaning of things, just like syntax highlighting helps transform "words" into "tokens" on our brains, or rainbow parens help us visualise the hierarchy of the language in question.
(Though I find rainbow parens a bit too colorful and distracting, so I don't use them in practice, I like the idea behind them)
It is the same idea that proponents of visual coding advocate for, but text as a medium is much better because of how compact we are able to make it without feeling cramped.