Hello Barry,
With regards to the identical == FALSE, it didn't occur to me - great point,
thank you.
So question: how did you end up changing the "<-", so to enable the creation
of the .metadata object?

Cheers,
Tal

----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------




On Thu, Nov 11, 2010 at 12:30 PM, Barry Rowlingson <
b.rowlingson@lancaster.ac.uk> wrote:

> On Thu, Nov 11, 2010 at 9:37 AM, Tal Galili <tal.galili@gmail.com> wrote:
>
> > 4) My real intention is to somehow change the "<-" operator (not simply
> the
> > assign).  I am unsure as to how to do that.
> > 5) Are there any major pros/cons to the adding of such meta-data to
> objects?
> > (for example, excessive overhead on memory/performance)
>
>  I had a go at doing (4) a few years back. The major problem I had was
> that if you do:
>
>  y <- 1:10
>  x <- y
>
>  with a <- operator that sets a timestamp then:
>
>  identical(x,y) is FALSE.
>
> I implemented timestamping by adding an attribute to objects during
> assigment by modifying the C source, and then lots and lots of R's
> tests failed during build because identical things were no longer
> identical.
>
> Might be better to store your metadata in a separate object, .metadata
> in the global env perhaps? Then just do:
>
> .metadata[[name_of_thing]]  = list(modified=Sys.time())
>
> in your modified assign.
>
> Performance will only be a problem if your program is doing nothing
> else except fiddle with metadata, I reckon. Your program does do
> something useful, doesn't it?
>
> Barry
>

	[[alternative HTML version deleted]]

