Would moving beyond ASCII be that much of a stretch for modern languages?
Would moving beyond ASCII be that much of a stretch for modern languages?
[1] https://docs.julialang.org/en/v1/manual/mathematical-operati...
• ≥: Compose > =
• ≠: Compose / =
You can define your own sequences too, if you want. I like to type exactly what I mean, including curly quotes and dashes and narrow no-break spaces and emoji and so on, but often didn’t like the default mappings (if there were any). As an example, I use this for curly quotes (look at the keys’ locations on the keyboard to understand—it’s coherent):
<Multi_key> <semicolon> <semicolon> : "‘"
<Multi_key> <apostrophe> <apostrophe> : "’"
<Multi_key> <colon> <colon> : "“"
<Multi_key> <quotedbl> <quotedbl> : "”"
(The only thing I can think of where I don’t normally type what I’d theoretically like to is hyphens, where I use ASCII’s HYPHEN-MINUS instead of the proper HYPHEN. I’ve never come up with a mapping I like—what with en dash, em dash, minus, &c.—and it’s also too common for fonts to lack a HYPHEN glyph.)When you’re used to this sort of thing, it comes completely naturally.
Somewhat more information: https://en.wikipedia.org/wiki/Compose_key
Not to mention there isnt one on your regular keyboard.
When you’re used to it, and given the comparative infrequency of the characters you use it for, it’s not much of a burden—just ~three key presses instead of one.
> Really dont need an extra modifier key.
Note that Compose isn’t a modifier key in the most common understanding of the word: you don’t hold it down while you press the others (which would certainly be awful for its ergonomics), but you press keys in sequence.
> Not to mention there isnt one on your regular keyboard.
On my current laptop I map RAlt to Compose. On my previous laptop, it was RMenu. There’s always at least one key there that you literally never need to use, and I find the ergonomics for thumb usage very comfortable. (But I really wish Space was split into at least two keys. It’s so stupidly large.)
If you can stand the tiny distant Return, get a Japanese keyboard.
I personally use AltGr (Mac Option) more than compose, since it's tractable to have almost the same layout on *nix and Mac. IIRC the default Mac layout has ≠ and ≤ ≥ in the obvious places, and they are just as easily touch-typed as shifted characters.
Compose is nice (on xkb systems) in that it's very easy to add personal customization to ~/.XCompose for task-specific characters.
For very common sequences that you always want to have mapped you can use a tool like AHK so that you don’t have to press Compose before.
The beauty of Compose though is that it works everywhere, and that it gives you access to a much larger character set in a very mnemonic way. For example, “ga” can map to “α” (“greek a”), “gb” to “β”, and so on. “2-” can map to “–“ (en dash), “3-“ to “—“ (em dash), “3.” to “…”, “c,” to “ç”, “i,” to “į”, “e,“ to “ę”, and so on. There are a lot of patterns that apply to a whole range of characters, it’s a bit like how commands combine in Vim.
help?> ≥
"≥" can be typed by \ge<tab>
search: ≥
>=(x, y)
≥(x,y)
Greater-than-or-equals comparison operator. Falls back to y <= x.
Examples
≡≡≡≡≡≡≡≡≡≡
julia> 'a' >= 'b'
false
julia> 7 ≥ 7 ≥ 3
trueA proper way would arguably be for the programming language to only understand “≥“, and for editors to provide support for entering such characters (or the user can configure a system-wide Compose key or similar). IMO we should work on standardizing keyboard input for those symbols instead of de-standardizing code display via ligatures.
Unclear if it will ever be ubiquitous, but I'm betting on widespread in a couple decades.
And the most basic reason is because a dedicated symbol looks much better (and doesn't break vertical alignment since it's one glyph)
I've never actually thought about using comparative characters, but that actually makes a lot of sense. I think people will disagree if you use them, but there's no reason why you wouldn't be able to call a variable x≥y≤z…
You could even compile a bunch of them into a header file.
life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}