r-lib / rex

Friendly regular expressions for R.
https://rex.r-lib.org
Other
334 stars 27 forks source link

namespace conflicts #13

Closed jimhester closed 10 years ago

jimhester commented 10 years ago

All of the functions in rex() except rex(), regex() and character_class() are really only valid when used inside a rex() call. We could not export them, which would solve the namespace conflicts, but doing so means that code completion won't work for them, and documentation would be weird then as well.

kevinushey commented 10 years ago

Maybe we leave them unexported, but provide something like rex_mode which puts these functions in an environment and attaches / detaches that environment (so we get auto-completion for a period of time, then we put it away when we're done)?

jimhester commented 10 years ago

That seems like a reasonable approach, if we go this route we should probably put a note mentioning rex_mode in the package startup message, so people can be aware of the option for completion if they want it.

kevinushey commented 10 years ago

Sounds like a good idea :) I can try to tackle this over the weekend.