Skip to content
Prev 47419 / 63424 Next

reference class internals

It's a bit of a simplification, reference classes are wrappers around
environments.  So if modifying a value in an environment would create
a copy, then modifying the same value in a reference class will also
create a copy.

The situation with modifying a vector is a bit complicated as it will
sometimes be modified in place and sometimes be duplicated and
modified (depending on whether its NAMED attribute is 1 or 2, and
exactly how you're modifying it).

Hadley
On Thu, Jan 9, 2014 at 4:33 PM, Norm Matloff <matloff at cs.ucdavis.edu> wrote: