Skip to content
Prev 8183 / 63424 Next

The class attribute on an environment seems buggy (PR#2159)

Peter Dalgaard BSA wrote:
For class-related work, embedding in a list (yes, I do that too) has
somewhat the wrong message, because now the object appears to extend
"list", whereas the intended model is that it extends "environment".

The distinction isn't all academic, because one would like to avoid
list-style computations for "[", etc, which are pretty much guaranteed
to cause trouble.
My personal need is for something that acts as a reference (aka
database, object table, etc.)  The understanding is that setting named
elements in this object works as for a reference--all copies see the
changes.  If the object can otherwise behave in standard "S language"
semantics, programming will be more straightforward.

For now, I use a list containing an environment, but eventually
something more direct will likely be needed.
OK, but as Henrik's mail suggested, users get unpleasant suprises from
trying to treat environments as ordinary objects.