Skip to content

Feature: Stricter addition #286

@TimTaylor

Description

@TimTaylor

The binary addition operator currently has the following implementation

`+.glue` <- function(e1, e2) {
  glue(e1, e2, .envir = parent.frame())
}

Would it be desirable to be a little stricter here and maybe error if one of the inputs is not a character / glue object. It feels like the following would be better to error:

1L + glue::glue("y")
#> 1y

Created on 2023-01-11 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions