WinVector / wrapr

Wrap R for Sweet R Code
https://winvector.github.io/wrapr/
Other
136 stars 11 forks source link

wrapr::let: "stringsubs" as the subsMethod default #1

Closed AndreMikulec closed 7 years ago

AndreMikulec commented 7 years ago

IMHO, keep "stringsubs" as the subsMethod default. People are already using it in this way. The method is not bad.

IMHO, keep all three subsMethod methods. People exist that need 'let' to work in different(new) ways.

JohnMount commented 7 years ago

Thanks for your input!

I already have feedback that "stringsubs" is considered unacceptable by some (for example). My current strategy is:

  1. Keep wrapr::let() restricted only to symbol to symbol substitution (not general values).
  2. Keep all 3 substitution methods "langsubs", "stringsubs", "subsubs" in wrapr::let() (so those that want or don't want one have an option).
  3. Have "langsubs" be the default procedure for wrapr::let() as it is a very good compromise between power and safety.
  4. Supply wrapr::seval() (new, now available in the development version) for those that want general string based substitution (please see wrapr issue 1 for some details and examples).

I know this isn't exactly your preference, but I think it is a good compromise among some competing goals.

AndreMikulec commented 7 years ago

Thanks.