Skip to content
Prev 82734 / 398506 Next

Age of an object?

Martin Maechler wrote:
I remember it was discussed several times. I don't remember why it was 
considered too difficult to do.
OK, now let me give examples where having such an information would ease 
the work greatly: you have a (graphical) view of the content of an 
object (for instance, the one using the "view" button in R commander), 
or you have a graphical object explorer that has a cache to speed up 
display of information about objects in a given workspace (for instance, 
the SciViews-R object explorer). What a wonderful feature it will be to 
tell if an object was changed since last query. In the view, one could 
have a visual clue if it is up-to-date or not. In the object explorer, I 
could update information only for objects that have changed...
Yes, but that would work only for objects designed that way, and only if 
the methods that manipulate that object do the required housework to 
update the 'last-changed' attribute (the question was about last access 
of an object, not about its creation date, so 'last-changed' is a better 
attribute here). If you access the object directly with, let's say, 
myobject at myslot <- newvalue, that attribute is not updated, isn't it?

Best,

Philippe Grosjean