On Tue, Apr 18, 2006 at 12:42:38PM -0400, Will Coleda wrote:
> On Apr 18, 2006, at 12:19 PM, Chip Salzenberg wrote:
> >On Tue, Apr 18, 2006 at 11:34:49AM -0400, Will Coleda wrote:
> >>On a side note, is there a way to get at the parent namespace if you have
> >>a namespace? I don't see anything in the PDD about it. (Seems you can only
> >>walk *down* the hierarchy, not up.)
> >
> >That's true.  Given aliasing there may not be just one parent, but I don't
> >suppose the distant chance of that will keep you from wanting this 
> >feature...?
> 
> Well, for the tcl interpreter/compiler, there's not a huge need.  
> Either I keep doing it the way I'm doing it now (and I'm *only* doing  
> it for getting at the internals at the moment); or you say bug and I  
> go back to doing it with find_global.

I think we should hold off this until we have a non-diagnostic use case.

I think it's a good idea to add this, as long as we name it in a way that
aliasing doesn't confuse the users.  How about

   PMC *get_original_parent()

?

It does occur to me that we might want a weak reference there, so that
namespaces can evaporate.

It also occurs to me more strongly that we don't want to have a get_name()
but rather

   PMC *get_original_name()

because aliasing may make the original and actual names differ.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to