> On Apr 23, 2024, at 10:29 AM, Hadley Wickham <h.wickham at gmail.com> wrote: > > > > On Mon, Apr 22, 2024 at 5:14?PM Simon Urbanek <simon.urbanek at r-project.org> wrote: > > > > On Apr 22, 2024, at 7:37 PM, Gabriel Becker <gabembecker at gmail.com> wrote: > > > > Hi Yutani, > > > > ALTREP is part of the official R api, as illustrated by the presence of > > src/include/R_ext/Altrep.h. Everything declared in the header files in that > > directory is official API AFAIK (and I believe that is more definitive than > > the manuals). > > > > That is not true at all - the presence of header does not constitute declaration of something as the R API. There are cases where internal functions are in the headers for historical or other reasons since the headers are used both for the internal implementation and packages. That's why this is in R-exts under "The R API: entry points for C code": > > If I understand your point correctly, does this mean that Rf_allocVector() is not part of the "official" R API? It does not appear to be documented in the "The R API: entry points for C code" section. >It does, obviously: https://cran.r-project.org/doc/manuals/R-exts.html#Allocating-storage-1 Cheers, Simon
> > > > > > ALTREP is part of the official R api, as illustrated by the presence of > > > src/include/R_ext/Altrep.h. Everything declared in the header files in > that > > > directory is official API AFAIK (and I believe that is more definitive > than > > > the manuals). > > > > > > > That is not true at all - the presence of header does not constitute > declaration of something as the R API. There are cases where internal > functions are in the headers for historical or other reasons since the > headers are used both for the internal implementation and packages. That's > why this is in R-exts under "The R API: entry points for C code": > > > > If I understand your point correctly, does this mean that > Rf_allocVector() is not part of the "official" R API? It does not appear to > be documented in the "The R API: entry points for C code" section. > > > > It does, obviously: > https://cran.r-project.org/doc/manuals/R-exts.html#Allocating-storage-1I'm just trying to understand the precise definition of the official API here. So it's any function mentioned in R-exts, regardless of which section it appears in? Does this sentence imply that all functions starting with alloc* are part of the official API?> For many purposes it is sufficient to allocate R objects and manipulatethose. There are quite a> few allocXxx functions defined in Rinternals.h?you may want to explorethem. Generally, things in a file with "internal" in its name are internal. Hadley -- http://hadley.nz [[alternative HTML version deleted]]