Skip to content

Should the default SEXP in r_vector be a typed vector of length 0 rather than R_NilValue? #392

Open
@DavisVaughan

Description

@DavisVaughan

i.e. to support things like #315 where you default construct the vector and immediately try and put attributes on it.

Would also simplify internal code that currently has to account for the possibility of R_NilValue as data_ quite a bit.

We'd have to write our own default constructor but I think that's totally possible?


A downside of this is that the default constructor would have to allocate and would no longer be noexcept or as "cheap", but I can't see that mattering much because you eventually allocate anyways?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions