Root-relative namespace keys

chromatic chromatic at wgz.org
Sun Jan 11 00:34:35 UTC 2009


On Tuesday 06 January 2009 22:57:22 Allison Randal wrote:

> We already have a consistent system for annotating sub parameters, so I
> have a hard time justifying inventing a new one. Because of this, the
> most compelling idea to me was to make :multi a no-argument modifier to
> .sub, and put the MMD decoration on the .params. We could make that
> consistent with class lookups by using the same key names:
>
>    .sub 'blah' :multi
>      .param pmc 'thingy' :hll('lang') :namespace('my') :name('foo')

I don't like the :namespace separation; we don't use it anywhere else.  With 
that said, I'm coming around to this approach.  It's more difficult to skim 
Sub signatures, but it doesn't cram as much information into a single element, 
and it's easier to see the important parts without ambiguity.

Life is going to suck somewhat for the poor fool who has to patch IMCC to make 
this work, though.

> Or, we could make it very clear that these are only used by MMD:
>
>    .sub 'blah' :multi
>      .param pmc 'thingy' :mmd_hll('lang') :mmd_ns('my') :mmd_name('foo')

I'd rather replace .param with .multiparam or something in that case.

> We'll also need an annotation for "does this parameter participate in
> MMD?" or maybe for "this parameter doesn't participate in MMD",
> depending on which is more common.

Exactly.

-- c


More information about the parrot-dev mailing list