Comparison is the wrong thing to mention here; after all, you found that diff coped.  It's when what you need is the name of a file that happens to have no data in it.  "Use for redirection, not when what you need is a file".