You tagged the question as best-practices, so first I'll tell you what's the best practice:
always treat math symbols as math
So the definition should be
\newcommand{\rsim}{\overset{r}{\sim}}
to be used like
We will use the symbol $\rsim$ to denote a very useful
equivalence relation, namely $a\rsim b$ if and only if
$a$ and $b$ are equally handsome.
If you want to break the “law” that math symbols are to be always regarded as such, then you can do
\usepackage{xspace}
\newcommand{\rsim}{\ensuremath{\overset{r}{\sim}}\xspace}
and the text above can become
We will use the symbol \rsim to denote a very useful
equivalence relation, namely $a\rsim b$ if and only if
$a$ and $b$ are equally handsome.
What's the gain? None at all. You even lose syntax coloring.
See When not to use \ensuremath for math macro?
$\rsim$
? A math symbol is never text. Note that your definition always produces a space that's generally not wanted. So you should remove the trailing space and type\rsim{}
in text, with the same number of keystrokes. I can't see any advantage.\newcommand{\rsim}{\ensuremath{\overset{r}{\sim}}\xspace}
. But be advised that this might have unwanted consequences in some circumstances; always better than a wrong space, of course. Add\usepackage{xspace}
. Also taking a one-way road from the wrong side can be faster than doing a longer route, but…\rsim
s in your document to see some noticeable compiling delay