Alexey Trofimenko writes:
> >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',
For some reason, it looks that way to me, too. Perhaps:
:shift value Â
I *think* that's better...
>
> oh.. I have a question.
> in
>
> %hash := { :keyÂvalue :key2Âvalue :key3}
>
> there's no need to put comma between, right?
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?
I don't think so.
> 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.
Well, not necessarily:
:foo bar Â
:ziph zam Â
:split spork Â
Although I'll admit that looks a little strange. Anyway, I suspect I'll
still be writing hashes perl5-style, while I'll use the new style for
named arguments.
> 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?
It's Perl: what's the difference?
Luke