Skip to content
Prev 56876 / 63421 Next

[External] Re: print.<strorageMode>() not called when autoprinting

On Wed, 22 May 2019, Lionel Henry wrote:

            
Looks like we intend auto-printing to do what evaluating the expression

    if (base::isS4(base::.Last.value)) methods::show(base::.Last.value) else base::print(base::.lastValue)

would do. The simplest approach would be to save this expression and
pass it to eval, or define an equivalent .autoprint function. That
would avoid code duplication and divergence.

I'm guessing the main reason we don't do this is that going through
the print() closure bumps NAMED on the value and forces a duplicate on
a subsequent assignment. This issue would disappear if we could manage
the transition to reference counting. In the meantime it would seem
best to keep any changes consistent with evaluating this expression.

Best,

luke