From misc7 at emerose.org  Fri Feb 26 02:49:19 2010
From: misc7 at emerose.org (Ben)
Date: Thu, 25 Feb 2010 19:49:19 -0600
Subject: [Rd] proto and baseenv()
In-Reply-To: <4B868B1A.5050409@stats.uwo.ca>
References: <20100225043854.GA26106@klutometis.wikitex.org>
	<20100224233350.4e3da5db.misc7@emerose.org>
	<4B8666E0.4070808@TU-Dresden.de>
	<20100225075038.79ca9b63.misc7@emerose.org>
	<4B868B1A.5050409@stats.uwo.ca>
Message-ID: <20100225194919.00b10700.misc7@emerose.org>

> I think you are looking for a different object model than proto
> offers.  There aren't many languages that offer the prototype object
> model.

Yes, your probably right---I don't have much experience using the
prototype model.  This is the way I expected it to work:

> z <- 1
> p <- proto(expr={a <- z})
> p$a
[1] 1
> p$z
Error in get(x, env = this, inherits = inh) : variable "z" was not found

Also it seems it would lead to fewer bugs if it worked that way.
(Peter Danenberg mentions he's run into bugs because of this, and I
can see why.)  But as I mentioned I'm new to prototype programming.
If it worked like in my snippet, would this lead to less effective
prototype programming?


Thanks,

-- 
Ben



[Rd] proto and baseenv()
Ben