From pcd at roxygen.org  Fri Feb 26 05:16:17 2010
From: pcd at roxygen.org (Peter Danenberg)
Date: Thu, 25 Feb 2010 22:16:17 -0600
Subject: [Rd] proto and baseenv()
In-Reply-To: <971536df1002251931r4972bcdes9c6910423fc52af6@mail.gmail.com>
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>
	<20100225194919.00b10700.misc7@emerose.org>
	<20100226022322.GB19263@klutometis.wikitex.org>
	<971536df1002251931r4972bcdes9c6910423fc52af6@mail.gmail.com>
Message-ID: <20100226041617.GB21674@klutometis.wikitex.org>

> Your preference is inconsistent with how the rest of R works and is
> inflexible since everything inherits from Object.

Really? Here are a couple of counterexamples in S3 and S4 objects:

  > z <- 1
  >
  > ## S4
  > setClass('A', representation(a='numeric'))
  [1] "A"
  > a <- new('A', a=z)
  > a at z
  Error: no slot of name "z" for this object of class "A"
  >
  > ## S3
  > a <- structure(list(a=z), class='A')
  > a$z
  NULL

As far as flexibility is concerned: keep the ability of people to
inherit from the parent environment if they don't mind
namespace-pollution and unpredictability.

I'm merely asking that the default behavior resemble the twenty-three
years of precedent since Ungar's original Self paper.

> Also I think your argument is based partly on repeating the original
> erroneous (relative to the writer's intention) proto code without
> repeating my correction confusing the discussion with simple user
> error.

I acknowledged your correction in an earlier email when I stated that,
"[one has] to choose between eval and parent pollution."



[Rd] proto and baseenv()
Peter Danenberg