Skip to content

Environment::(get,find)( Symbol ) #326

Description

@romainfrancois

Currently the get and find members only take std::string :

SEXP find( const std::string& name) const ;
SEXP get(const std::string& name) const ;

What they do with the string is that they first make a symbol, with install and then they call the relevant C/R API function, i.e. Rf_findVarInFrame or Rf_findVar.

But sometimes, we already have a symbol and perhaps don't want to pay for the double cost of:

  • converting that symbol to a std::string
  • let get or find reconvert it to a symbol

The alternative being calling C/R API directly.

So can we have:

SEXP find( Symbol name) const ;
SEXP get( Symbol name) const ;

This is straightforward, and I'll probably submit a PR anyway, but since I don't have time right now, I'm just logging the need and intent here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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