James Mastros writes:
> 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. 

That's wrong.  I can't determine whether you knew it was wrong, and
your final assessment sentence was intentionally wrong (thus "Whoops").
But, in Perl 5, they're both literals.

> 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).

I don't know what argumentless shift does now.  It probably works on
@*ARGS when you're in the main program, but inside a sub... I dunno.
Maybe it shifts from the slurpy array argument.  Shifting on the topic
seems wrong (since you could use .shift for that).

Luke

Reply via email to