On Mar 10, 2006, at 23:09, Roger Browne wrote:


Will there be a way to get back into the default top-level namespace?
e.g.:

   .HLL ""

or

   .HLL "parrot"

My Amber compiler is currently adding a few extra subs to some of the
standard parrot PMCs, and I won't be able to do this if I'm in the Amber
namespace as soon as I emit '.HLL "amber"'.

Yep. That should work. The default parrot namespace isn't yet layed out, but .HLL '' could of course reset the default namespace to the very root.

Adding symbols to a different namespace can easily be achieved by:

  ns = get_namespace ['parrot'; 'Integer']
  ns['sym'] = sub

BTW

  ns = get_namespace ['xx']

which defaults to

  ns = get_namespace 'xx'

isn't specced and not implemented. Currently you'd have to use an one-element array.

leo

Reply via email to