futureverse / futureverse/listenv

CONCERN: Is it safe to have attributes on environments?

Open
#32 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
R
Stars
31
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Note to self: Is it safe to have attributes on environments? It might not be, cf. https://github.com/wch/R6/issues/64 and https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16441.

UPDATE: I'm pretty sure I went through this discussion back in ~2001/2 for the R.oo package. The Object:s in R.oo basically uses:

``` r
x <- NA
attr(x, "envir") <- new.env()
class(x) <- c("Object")
```

such that attributes are _not_ attached to the environment. However, I'm not sure if this is related.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.