Austin Hastings wrote:
Larry Wall wrote:
   * We get the cute, clean and rather more typeable

$var<key1><key2>[3]<key3>

No more or less typeable for me, or anyone else who can remap their keyboard. I'm presuming there's something costly about {} on non-US keyboards, but how much does it cost? and do those non-US perl hacks use remapping already?

German keyboard, for example:

{ -- right alt, and the 7 key
[ -- right alt, and the 8 key
] -- right alt, and the 9 key
} -- right alt, and the 0 key

German keyboard under xfree86 but not windows:
« -- right alt, z (Well, the key that's z on an American keyboard).
» -- right alt, x

Those are /really/ hard to type, esp }, which comes up a /lot/ in perl, weather 5 or 6, which is a big reason that I use the American keymap, which is a constant annoyance to my girlfriend, who uses the British keymap. (We're an American and a Brit, living in Germany.)

The problem with {} for a hash dereference operator is not it's typeablility, but rather it's autoquoting behavior from perl5. In perl5, the contents of {foo} are a string -- except when they aren't. Quick:

  $wheel->{roll}  = 3;
  $wheel->{shift} = 4;

In perl5, the first is a literal, the second shifts from @_. Whoops. In perl6, the contents of {} is an expression. The first is an error unless a function named roll is available (or a method on the topic?). The second is good old shift (on the topic now).

OTOH, $wheel.<roll> and $wheel.<shift> are both literals. (The dot there is optional.) (Until a little bit ago, that was $wheel.<<roll>> or $wheel.«roll». (Note that I had to switch keyboard layouts again to type that.))

-=- James Mastros

Reply via email to