R | ALTREP Framework
The ALTREP ("alternative representation") framework [1] for R is a way for packages to customize the underlying implementation of basic R objects (e.g. vectors), while ostensibly keeping their behavior in R exactly the same. This gives packages more flexibility when processing data while not changing how R code works from the package user's perspective.
For example, in base R, all values of vectors are held in memory, but with this framework, a package can instead have the in-memory representation of the vector point to a location in the hard disk where the value is held, and only read in the data when it's needed.
In theory, any data using ALTREP to behave identically as their non-ALTREP counterparts when used in code. However, in practice some differences will leak out, especially when it comes to memory usage and error detection. See [2] for an example in the vroom
package.
Resources:
[3] High-level breakdown of how ALTREP works: https://www.bioconductor.org/help/course-materials/2020/BiocDevelForum/16-ALTREP.pdf