On Sat, Jan 26, 2002 at 10:33:54AM -0800, Peter Scott wrote:
> Maybe there will be a Perl 6 rule forcing the keys to be quoted, but it
> won't be because of the "no barewords" rule. If there were such a rule, I
> presume you'd also apply it to the LHS of =>?
It's only a bareword when the parser doesn't have a clue, remember? :)
Here's another interesting one:
Note that a token like Error::Overflow is not a bareword because it's a
declared class. Perl 6 recognizes package names as symbolic tokens. So
when you call a class method as Class::Name.method(), the Class::Name
is actually a class object (that just happens to stringify to
``Class::Name'').
What does this mean for
$foo{Bar};
versus
class Bar;
$foo{Bar};
(I wonder what the "package main" equivalent to get back to a non-class
environment might be)
I can't help thinking that requiring quotes will make it all nice and
consistent, and completely zap all these edge cases.
--
A year spent in artificial intelligence is enough to make one believe in God.