Roger Browne <[EMAIL PROTECTED]> wrote:
> 1. LANGUAGES AND NAMESPACES
>
> In my previous messages, I was concerned that languages were being
> shoehorned too tightly into their own namespaces.
>
> But after a careful reading about "import_into", I am happy that each
> language has sufficient ability to insert its symbols into the namespace
> of another language (when asked to in the proper way, of course).
>
> So I retract the concerns that I expressed. But I still find the intent
> of the spec unclear here:
>
>    - Languages should contain their namespaces

Yes, I wasn't sure how to word that best.

> because the "add_namespace" opcode seems to allow arbitrary namespaces
> to be created. Maybe the strongest thing we can say is:
>
>    - All namespaces are organized under first-level namespaces
>      whose names will typically correspond to HLL names

That's better, thanks.

> 2. TYPED INTERFACE
>
> I assume it's an error that both "add_var($S0, $P0)" and "store_var($S0,
> $P0)" are listed in the typed interface API for namespaces. I assume
> that "add_var" is the intended name.

Good catch.

> 3. "name()" METHOD
>
> The example suggests that perl5:Some::Module would return an array
> containing "Some", "Module". Instead, don't we want it to return
> "perl5", "Some", "Module" to match the params required by the
> "get_namespace" opcode?

Another good catch. This method was new in the latest draft.

> 4. LANGUAGES AND COMPILERS
>
> There are at least four notions of "Language" here:
>
>    (1) The language named in the .HLL directive.
>
>    (2) The name registered with "compreg".
>
>    (3) The name of the first-level namespace.
>
>    (4) The programming language in which the source code
>        was originally written.
>
> Presumably we can ignore (4) because, by the time the code is compiled,
> Parrot doesn't know or care what the original language was.
>
> Of the other three, which of them are necessarily the same? If (3) must
> be the same as (1) and/or (2), then we probably cannot force (3) to be
> all-lowercase unless we force the others to be all-lowercase too.

I was advocating having (2) and (3) be all-lowercase. I'm not sure
which are necessarily the same.

> 5. THE FINAL EXAMPLE
>
> In the final example, what is the purpose of this line:
>
>    add_namespace ["perl5"; "Some"; "Module"], $P1
>
> As far as I can tell, the intent of the following line is to import
> tcl:Some::Module 'w*' into the _current_ perl namespace, not into
> ["perl5"; "Some"; "Module"]. Am I missing the point here?

No, I meant to take that line out but I forgot.

Thanks, Roger. Your email was helpful.

--
matt diephouse
http://matt.diephouse.com

Reply via email to