r-lib/rex

namespace conflicts

jimhester opened this issue · 3 comments

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.

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)?

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.

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