Skip to content
Prev 57270 / 63424 Next

[External] Questions regarding ALTREP_SET_ELT APIs

On Tue, 30 Jul 2019, Wang Jiefei wrote:

            
For now, yes. We do support a Set_elt method for ALTSTRING classes but
not yet for others. I seem to recall that there are some issues with
going there for others, but we'll probably take a closer look later
this year.

One thing to keep in mind is that the R pass-by-value semantics
require that C code duplicate an object for which MAYBE_REFERENCED is
true, and the assumption in existing code is that duplicate returns an
object that can safely be mutated. That places a lot of limitations on
what can be done. You can see some notes on the issues in the
README.md and the vignette in
https://github.com/ALTREP-examples/Rpkg-mutable.

Best,

luke