John Siracusa wrote: > On 12/12/02 12:55 PM, Larry Wall wrote: > > As for namespace pollution and classes that use .id in Perl 5, I > > don't think it's going to be a big problem. Built-in identifiers > > do not have a required prefix, but they have an optional prefix, > > which is C<*>. I think we can probably parse > > > > $a.*id == $b.*id > > > > if you really need to get to Object.id(). > > That'll only work out if everyone always writes it as "*id". > If not, my Perl 6 objects that override "id()" won't work correctly > with any other classes or functions that simply call "id" and > expect it to really be "*id"
yes... So we'll _have_ to write $obj.*id when we mean $obj->UNIVERSAL::id; I'm not sure I understand what Larry means by "most-global"... Do you mean outer-most scope, root-of-method-inheritence, or both? And what of the case we someone does want to explicitly override a "builtin" method like UNIVERSAL::can? What is the Perl6 equivalent to: *UNIVERSAL::can = sub { print qq{hello\n} }; sub foo {}; print main->can('foo')"; And what will: main.*can('foo') result in? Larry Wall wrote: > > I'd almost be tempted to argue that if push comes to shove, it's > the list splat star that gets shoved. Don't you suspect the list splat will be more common than most-global?