Keyboards and language design

darobin on 2003-04-09T14:03:14

Given a French keyboard where ~#{}[]|`@ are all accessible only through Alt-Gr would you have designed Perl the same way or would you have gone more in the direction of Python or Ruby? All those sigils do tend to be extremely ASCII-keyboard centric.


(french keyboards)--

Dom2 on 2003-04-09T14:53:44

Last time I used a french keyboard, it took me 5 goes to write qwerty, and that was with staring at the keyboard. :-)

In answer to the question, I'd say that the answer is probably that they would have been different. Think back to early unix commands being very short due to input device limitations (teletypes were too slow for long commands).

-Dom

$ (did you know use Perl; won't allow '$' as a sub

jdavidb on 2003-04-09T15:12:20

So all those characters are missing, but $ is there? Odd. Sounds like American imperialism to me.

taper a` la masheen

TorgoX on 2003-04-09T18:18:35

What, you do your own typing?!?

Re:taper a` la masheen

darobin on 2003-04-10T09:09:43

Oh, you mean that's what pair programming is about?

ASCII 0wn3z 70u

belg4mit on 2003-04-09T20:40:03

I'm pretty sure Larry has gone on record as
still thinking sigils are a good idea, and I
agree. There's nothing preventing a frenchman
or Russian from using an American keyboard
layout, or any other there heart desires;
particularly if they are running something
like Linux. And braces are hardly Perl-specific.

Re:ASCII 0wn3z 70u

darobin on 2003-04-10T09:00:52

That's not the point. There's nothing preventing me from using a speech to text engine either. It's a question of the influence on language design.

Re:ASCII 0wn3z 70u

belg4mit on 2003-04-10T14:42:09

It is the point, reread the first sentence.

Re:ASCII 0wn3z 70u

darobin on 2003-04-10T15:41:32

The question being "would it have influenced the design of the language" I still don't see the link!

Definitely not!

htoug on 2003-04-10T08:24:31

C, shell, sed, awk etc would have been designet otherwise as well!

Once when I had to do a long stint of Pascal programming (ah the olden days) I found a North American keyboard and used that.
That also made me realise why on earth the slash (/) is used as a regexp separator - it sit nicely in the lower right hand side of the keyboard - just where dash is on my danish keyboard, instead of as shift-7.

I had to give up after a while, as it was just too difficult to write normal danish in comments, letters, notes etc - as 3 letters of the alphabeth are missing from the keyboard: 'æ', 'ø' and 'å' - ok they are not too common, but imagine having to use a 4-key-combination to type 'm', 'p' and 'w' ;-) I just gave up and went back to using '-4' to write '$', '-7' for '{' and so on...

It was quite amusing btw. to watch people on one of the perl6 lists discuss which keysequence was easiest to type (I can remember which, but both where very awkward on my keyboard. They obviously didn't realise that their keyboard was not the only one in exsistence.

This is one of the advantages of living in a multilingual and multicultural part of the world: you realise that diversity is the norm.

Re:Definitely not!

darobin on 2003-04-10T09:09:15

C, shell, sed, awk etc would have been designet otherwise as well!

Yes! But Python and Ruby would remain the same...

I can live with stuff being on Shift. What pains me is Alt-Gr (dunno if you have it, it's for a third item on the same key and sits immediately right of the space bra [typo intentionally not corrected] instead of the right Alt key). You mention "/", but on French keyboards "\" is much worse being Alt-Gr-8 (done with a single hand, thumb on Alt-Gr, middle finger on 8 -- it's quickly painful). Needless to say Windows/DOS paths drive me crazy.

I used qwerty keyboards exclusively for a long time and I liked it (UK keyboards, they're better than US ones). Most OSs have shortcuts to type in accents (and I don't write in French much). At work I don't but since I'm to start programming more, I'm pretty certain I'll go back to qwerty.

Re:Definitely not!

perigrin on 2003-04-12T00:14:29

I'm afriad I have to contest the bit about the UK keyboard being better the the US keyboard.

They swap @ and " ... for no apparent reason. If anything Perl has made me more sensitive to the similarity and differences in the usage of '/" and happy that on the keyboards I use most often (imported with from the states because I'm cheap like that) they're actually on the same key.

I can understand # being their funnly little L thing that they use for their currency, it might be useful occasionally (and if Larry were british would probably define a special case of Large Scalar), but moving @ is totally arbitrary and sounds almost as sadistic as the French keyboard.

Re:Definitely not!

darobin on 2003-04-14T09:30:29

Nah, the US keyboard is the one swapping the @ and ", you got it the wrong way 'round.

I'm not sure about using £ or £ for scalars, I think that in the interest of I18N the best would have been the universal currency symbol, ¤.

Yes

pudge on 2003-04-10T11:45:09

It probably would have been different if it were designed on a French keyboard. So I am thankful it wasn't.

German keyboards too ?

tinman on 2003-05-22T15:18:59

Although it wasnt as bad, I learnt Perl when I was using a German (European) keyboard layout.. took me ages to "relearn" how to type Perl when I started using a US keyboard layout again, especially since I'm not a true touch typer, but simply 'remember' the key positions

What's worse, I got used to playing Starcraft in German (with hotkeys) and the English hotkeys are COMPLETELY different :)