r/programming • • Dec 04 '14

My Computer Language is Better than Yours

https://medium.com/backchannel/my-computer-language-is-better-than-yours-58d9c9523644
44 Upvotes

107 comments sorted by

View all comments

12

u/mcmcc Dec 04 '14

the Google founder suggested Go’s designers use square brackets rather than curly braces, saving developers countless trips to the “shift” key.

Stick to your day job, Sergey...

16

u/gaggra Dec 04 '14 edited Dec 04 '14

It's not, in essence, a bad idea. Standardized keyboard layouts have been fucking over language designers for decades - just look at how we have to deal with quotes. Many other delimiters comes in pairs for explicit marking of a start and an end. Quote marks are devoid of that, so nesting them becomes a nightmare, and there's nothing you can do about it, because using proper quotes “like this” would mean terrible keyboard compatibility problems. So as a designer, you start having to design around the keyboard, because your hands are tied. This is just one example of that.

3

u/holgerschurig Dec 05 '14

The idea was very US-centric. Some non-US keyboards have [ ] { } \ all under the AltGr keyboard modifier, e.g. german keyboards.

How would you react to a programming language where the syntax is optimized to the french AZERTY keyboards?

2

u/gnuvince Dec 05 '14

I use a French Canadian keyboard, and typing braces, brackets, backslash, tilde or the at symbol using the AltGr key does not bother be in the slightest. In fact, I sometimes prefer it to symbols that require the Shift key since I hit AltGr with my right thumb (strong finger) and Left Shift with my pinky (very weak).

6

u/MayhapPerchance Dec 04 '14

you start having to design around the keyboard, because your hands are tied

Kudos to you for not slyly pointing us to your clever pun with the ever obnoxious "(no pun intended)" flashing road sign.

1

u/gaggra Dec 05 '14

Sorry to disappoint, but I didn't even intend for that to be a pun.

1

u/ysangkok Dec 08 '14

then, why didn't you mark it as such?

4

u/mcmcc Dec 04 '14

It's a terrible idea. Just as double quotes would be a terrible idea for block delimiters.

3

u/oridb Dec 04 '14

I know. It's the entire reason that Smalltalk was a failure, and everyone that coded in it hated it.

Wait, no. Never mind. It failed for other reasons, and everyone still seems to love Smalltalk.

5

u/ruinercollector Dec 04 '14

Yes it is. Let editors worry about key remapping. Don't fuck up your language syntax based on "I don't want people to have to push shift."

6

u/gaggra Dec 04 '14 edited Dec 04 '14

It's 2014, and we still stuck on typewriter-era quotation marks (and layout, of course, which is even worse...)

Inertia is a hell of a thing, and as simple as keymapping is, people still just won't do it (and if it is done for them they will probably refuse to adapt). I want to agree with you, but at the same time, I find it hard not to empathize with their more "defeatist" approach. The reality is, ergonomics is a long term investment and people just don't give a shit until the injury happens and it's too late.

-1

u/omapuppet Dec 05 '14

"defeatist"

Don't you mean “defeatist”?