On Fri, 9 Jul 2004 18:00:44 -0700, Larry Wall <[EMAIL PROTECTED]> wrote:

On Sun, Jun 20, 2004 at 03:41:41AM +0400, Alexey Trofimenko wrote:
: There was some talks about hash keys autoquoting and barewords.. later are
: gone and former is disambigued by forcing to write %hash{'key'} or
: %hashÂkey ( as opposite to %hash{key} which is now %hash{key()} )..
: right?..
: that's almost ok to me, if there's any hope that  will have a _standard_
: way to type accross all the editors:) (btw, I also hope I would never
: happen to mantain a perl6 program written by Chineese programmer, who
: thinks that chineese identifiers are cool)..
:
: but now I'm curious what you gonna do with => autoquoting behavior:
:
: shift => 'value' is the same as
: shift() => 'value' or
: 'shift' => 'value' in perl6?
:
: or in this particular case consistancy doesn't matter? ,)


Well, consistency with *what* is the question.  The default Perl 6
design rule is that, unless we've said otherwise, Perl 6 is consistent
with Perl 5.  So for the moment, => still autoquotes its left side.

only if it does look like an outlawed bareword?.. ah.. 100% perl5 syntax. I like that:)



Arguably, the :shiftÂvalue syntax makes it easier to quote both
sides of a pair, so perhaps there's a little less need for an
autoquoting =>.  But I think that generating non-quoted keys for
subscripting happens a lot more often than non-quoted keys for pairs,
so I'm inclined to leave the autoquoting of => in for now.

Larry

strange, but :shiftÂvalue looks a little more noisy to me than shift => 'value',


oh.. I have a question.
in

 %hash := { :keyÂvalue :key2Âvalue :key3}

there's no need to put comma between, right?
I wonder about mixed synax:

 %hash = ( :keyÂvalueÂ
           :key2ÂvalueÂ
           :key3
           key4 => 'value',
           'key5','value',
           Âkey6 value key7 value )

Did I make mistakes here?
if all was right, than I can figure that :key Âvalue (with whitespace between) is outlawed..
Bad Thing for people who like to write pairs in columns.


ah.. sorry about messing up all question in one post, but I have one more:)
if key could be of any type, not only strings, than what will be with numeric keys? would they be converted to strings automatically?

Reply via email to