Root-relative namespace keys

Allison Randal allison at parrot.org
Sun Jan 11 00:03:21 UTC 2009


perlpilot wrote:
> 
> How would  this affect the use of underscore to mean "any"?  For
> instance, would the following make sense?
> 
> sub 'blah' :multi
>     .param pmc 'alpha' :hll('L') :namespace('N') :name(_)      # any
> class from the hll L and the namespace N?
>     .param pmc 'beta' :hll('L') :namespace(_) :name('C')        # a
> class C from any namespace in the hll L?
>     .param pmc 'gamma' :hll(_) :namespace('N') :name('C')  # a class
> C  from namespace N in any hll?
>     .param pmc 'delta' :hll('L') :namespace(_) :name(_)         # any
> class in any namespace from hll L?
> 
> extrapolate the others, because hopefully you get the idea by now :-)
> 
> Would the above do something useful?

It would mean '_' goes away and you just mark 'this parameter 
participates in multiple dispatch', without adding any additional 
information.

Allison


More information about the parrot-dev mailing list