Based on a status report from Leo {thanks!} and my recent revisions to
pdd21, here's a list of things that need to be done to bring parrot fully
into the new world of namespaces.  The items are roughly in descending order
of importance.  There's room for several contributors here....


[[ NAMESPACE PMC ]]


 * default namespace needs a typed interface

   The good news is that the default {add,del,find}_{sub,var,namespace}()
   methods don't have to do much, as the default namespace should be 100%
   untyped (i.e. no name mangling should be done whatsoever).


 * default namespace needs export_to()


[[ COMPILER PMC AND/OR HLL PMC ]]


 * get suggestions for new HLL PMC distinct from compiler PMC, or get
   reassurance that compiler PMCs are actually not all that heavy after all

   I don't remember who added load_library() to the API of compiler PMCs.  I
   think that might be a mildly bad idea, since a compiler could conceivably
   be a fairly heavyweight object to create.  Perhaps an HLL PMC separate
   from an HLL compiler PMC could solve this problem.

   In the meantime, though, it will work.  And we need a hook on which to
   hang HLL-specific behavior.  Thus the next item, in which we take this
   idea and run with it:


 * pdd21 wants compiler PMCs to implement load_library() and get_namespace()

   I expanded the already documented load_library() with a second parameter
   today, and also added get_namespace() to do namespace lookup within the
   given HLL's namespace hierarchy.

   Both of these methods have reasonable defaults, so it should be possible
   for most HLLs to just inherit their 


[[ MISC PARROT CORE ]]


  * load_library opcode should use <compiler>.load_library()
  * get_namespace opcode should use <compiler>.get_namespace()

      These are obviously dependent on the previous item.  :-)

  * introspection and "parrot -t4" should display namespaces as ["a";"b";..]


[[ USER CODE ]]


 * standard Parrot libraries not associated with any HLL should have their
   own namespaces

   For example, PGE should live in a ["pge"] namespace, or, conceivably,
   under ["parrot";"PGE"].  In any case, the current double colons are
   obsolete.


[[ PDD21 ]]


 * pdd21 should document current namespace hierarchy

   <leo>
      Currently the default compiler's namespace is 'parrot' (for PMCs) and
      '__parrot_core' (for builtin MMD subs).
      See also $ ./parrot examples/namespace/namespace_dump.pir |less
   </leo>


That's the list as I know it.  Additions, corrections, and patches welcome.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to