From pcd at roxygen.org  Sat Feb 27 09:36:20 2010
From: pcd at roxygen.org (Peter Danenberg)
Date: Sat, 27 Feb 2010 02:36:20 -0600
Subject: [Rd] proto and baseenv()
In-Reply-To: <4B87C4C4.6020201@stats.uwo.ca>
References: <20100225075038.79ca9b63.misc7@emerose.org>
	<4B868B1A.5050409@stats.uwo.ca>
	<20100225194919.00b10700.misc7@emerose.org>
	<20100226022322.GB19263@klutometis.wikitex.org>
	<971536df1002251931r4972bcdes9c6910423fc52af6@mail.gmail.com>
	<20100226041617.GB21674@klutometis.wikitex.org>
	<971536df1002252042q40b9b00do23b24370ea919482@mail.gmail.com>
	<20100226054154.GA23715@klutometis.wikitex.org>
	<971536df1002260409ud3ca15od596bf7af753d8be@mail.gmail.com>
	<4B87C4C4.6020201@stats.uwo.ca>
Message-ID: <20100227083620.GA27958@klutometis.wikitex.org>

> One thing that I dislike about scoping in R is the fact that even in a 
> namespace, searches eventually get to the global environment.  I'd prefer 
> if namespace searches went through the imported namespaces and nothing 
> else.  If that were the case, then the a$z example would never find a z in 
> the global environment, and that example would only be a problem for people 
> fiddling around in the console, not programming carefully in a
> package.

Amazing, Duncan; I think you hit upon the perfect compromise. Though
the issues you're bringing up are bigger than proto; at least in the
case of proto, deriving from as.environment(2) is an interesting
stop-gap solution.

Thanks to Gabor for suggesting it.



[Rd] proto and baseenv()
Peter Danenberg