lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The only issue i have with "~=" is because of how stupid it is to type tilde on a scandiavian QWERTY keyboard, resulting in either "Alt Gr + ]" "Alt Gr + ]" backspace (as compared to an uk layout) or in this particular case "Alt Gr+]" "="as tilde somehow functions as a modifier that isn't printed until there is a following character. I don't know if this is the case with the US layout.

Generally the scandinavian layout is rather terrible for programming C-like languages, causing weird handstrain due to how horribly all variations of parenthesis are placed (Too bad the simula styled syntax didn't win the old language wars).

Otherwise i find ~= to be a rather good choice, and i see no point in changing it to anything else as that'd just add unecessary complexity for no obvious gain.


On Mon, Apr 28, 2014 at 7:22 PM, Jay Carlson <nop@nop.com> wrote:
On Apr 28, 2014, at 11:26 AM, steve donovan <steve.j.donovan@gmail.com> wrote:

> On Mon, Apr 28, 2014 at 3:18 PM, Roberto Ierusalimschy
> <roberto@inf.puc-rio.br> wrote:
>> "Other" from what? How would you manipulate a pattern with patterns?
>
> Fair enough; one can't escape the escape problem, and personally I
> don't consider it a big problem at all. Fortunately Lua uses %d rather
> than \ which itself needs to be escaped.  The author's examples are
> pretty, but not practical, just as typesetting and writing are
> different as long as we use keyboards.

This is alphabet-centric.[1] Chinese and Japanese users do not have keyboards which map 1:1 to their written languages, and can't. They're already used to keystrokes being mediated by input methods. My apologies in advance for butchering the Japanese language here:

If I'm using a QWERTY keyboard, I'll use one of the romanji IMEs to type Japanese. The process looks like this:

keystrokes: n a r i t a

which is transformed as I type to the hiragana syllables "na" "ri" "ta":

hiragana: なりた

Pressing space or tab gives me the choice of which Japanese phrase I meant:

成田空港: kanji: Narita International Airport
成り立つ: kanji/hiragana: uh some phrase like "consisting/composed"
成田山: kanji: Narita-san, literally Narita mountain; I'm guessing Naritaberg or Naritamont would be more idiomatic renderings.

Simple "成田" is "Narita", which apparently is also used as shorthand for the airport the way "Newark" or "Gatwick" would be by English-speakers? I dunno.

The point of all this is that your smartphone experience with spelling correction and all kinds of funny symbols available as press-and-hold popups is the way much of the world actually writes. If I want "≠" on my phone, I can just hold down the "=" softkey. (OS X leads the way in bringing this to English and physical keyboards.) Static mapping of key chords to octets is gonna be a historical oddity. We get to choose how deeply our programming languages are tied to this oddity.

Jay

[1]: Well, you can fit hiragana onto key chords, so "syllabary- and alphabet-centric"; you can cut out the romanji middleman in Japanese. The Korean alphabet is a lot easier to type, although you still need the Chinese-character input methods for some styles of writing. For now.