Why is there no or or and ?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Feb 17 10:00:25 PST 2012

On Fri, Feb 17, 2012 at 06:30:09PM +0100, Marco Leise wrote:
> Why didn't I think of that before! The perceived ease of use depends -
> in parts - on the spoken language you use, because different keyboard
> layouts are used. To pick up your example, I don't mind := because I
> have to hold [shift] already for a normal =. I just compared the
> default US and DE layouts. Here are some characters that can be
> achieved with one key stroke in either layout exclusively:
> US: =[];'\/`
> DE: #+^´
> So while the US layout lacks XOR and even + (wow), I'm a bit jealous
> on =, array operations [], end of statement ;, division /, character
> delimiter ', and raw string delimiter `.

You're right! The keyboard layout matters a lot. I remember on older
keyboards [] and {} were in hard-to-reach places and require holding
down the shift key. Today at least [] are easy to reach, so D's array
notation is very convenient.

> Then I remembered what happened when I enabled Pascal as a language
> for aichallenge.org:
> http://aichallenge.org/language_profile.php?language=Pascal
> A flood of users from countries with a Cyrillic keyboard layout joined
> the competition using Pascal. Back then I thought it was just a random
> prevalence of Pascal for reasons like, that being the language taught
> in schools. Now I wonder if - aside from what is taught at schools and
> aside the fact that they mostly use English layouts to write code - it
> is the lack of keys for | and & on a typical keyboard that makes
> Pascal look more appealing:
> http://en.wikipedia.org/wiki/Keyboard_layout#Cyrillic That's just a
> wild theory.

I think that theory has some truth to it. For example, I learned
Cyrillic keyboard layout as part of learning Russian, and I felt the
inconvenience of certain symbols like / (needs a shift and located in an
awkward corner), esp. when typing paths in Unix. Basic things like ;
requires a shift key and reaching to the upper number row, which makes
typing statements quite awkward. I still don't know how to make certain
symbols in Cyrillic layout. (Good thing I configured X11 to switch
between EN and RU in a single keystroke: makes a huge difference in
usability.) Imagine if your programming language required those
hard-to-type symbols in the most common places.  It would be a great
turn off.

> I might look into tuning a keyboard layout towards D programming a
> bit. :)

I thought the US/English keyboard layout is already very well suited to


Ruby is essentially Perl minus Wall.

More information about the Digitalmars-d mailing list