My personal favorite fonts at the moment are Jetbrains Mono & MonoLisa (both with ligatures disabled of course)
My personal favorite fonts at the moment are Jetbrains Mono & MonoLisa (both with ligatures disabled of course)
https://docs.raku.org/language/unicode_ascii just kind of rubs me as the wrong way to go.
While I realize '…' and '...' are syntactically equivalent, it means that if someone is writing $foo³ and I need to change that to $foo² - I can't do that without changing it to $foo**2 ... and that results in two different styles of code (unicode and ascii) in the same file which means that future maintainer me has more difficulty.
(note: I still don't know how to type ³ - that's me copying out of another file)
If you use ² and ³ a lot in your work, I'm sure you can install a macro / keybinding / whatever to access them quickly.
And in any other case, https://docs.raku.org/language/unicode_ascii is a bit of a Rosetta stone in the cases you don't know how to type them, because you can copy / paste them from there.
Finally, the Raku documentation also contains information on how to type these unicode characters on your OS: https://docs.raku.org/language/unicode_entry .
I'm ok with APL doing all its special characters, but if you can write the same syntax in two ways, one of which is much more accessible than the other, then the less accessible way was a poor design choice.
Allowing for two styles for the same syntax can (and will) lead to multiple styles depending on who wrote that line. Conflicting styles (mixing tabs and spaces anyone?) in turn makes the maintenance of the code more difficult and time consuming which is something that is often forgotten in the rush to write code.
They write stuff like:
Tyᴹ : (A : Ty) → {X₀ X₁ : Set} → (X₀ → X₁) → Tyᴬ A X₀ → Tyᴬ A X₁ → Set
Tyᴹ ι Xᴹ α₀ α₁ = Xᴹ α₀ ≡ α₁
Tyᴹ (ι⇒ A) Xᴹ α₀ α₁ = ∀ x → Tyᴹ A Xᴹ (α₀ x ) (α₁ (Xᴹ x))
I kind of get the "looks like math" thing, but I find the poor typography distracting.(Sample taken from https://github.com/AndrasKovacs/thesis/blob/main/agda/Simple... - learning the language is still on my todo list.)
int x = 3;
if (x<-5) {
return 1;
}
Renders as: int x = 3;
if (x⬅5) {
return 1;
}
which makes no sense.With a userstyle you can turn off ligatures in your browser for code blocks. The trend isn't just editors, but some developers want to push it on their audience in their blog too. https://developer.mozilla.org/en-US/docs/Web/CSS/font-varian...
For context, I'm 40, and spent decades programming without them.
I also prefer the lack of them, exactly because they apply to strings and comments too, where they are often undesired.
I write Clojure code most of the time, so maybe that's a deciding factor too...
Julia was right in allowing developers use unicode for variables and operators, so if you want ≤ you simply use that directly (or type \leq in your editor).
If languages opt to make “≠” equivalent to “!=“, match all styles of open/close quotes, and enable me to attribute a value to a variable using an arrow, that’s great.
In the meantime, I’m not sure they are a net positive in all cases and fear they may drive unfortunate syntax choices for people who design languages.
It's possible in Emacs: to enable relevant ligatures for an active mode.
I’ve found this to be the best of both worlds. I like reading code with ligatures but would always get tripped up when editing.