The following usage of `\ifx` can be found in several packages and also in answers on this site. What does this syntax exactly mean? Are there any alternatives and drawbacks?

```
\newcommand{\mycommand}[2][]{%
  \ifx\\#1\\
    <true>
  \else
    <false>
  \fi
  % ...
}

```

(I actually know the answer, but thought this question should exists here. It pops up from time to time. In the unlikely case that it isn't fully answered I will post an own answer in a few days.)