I haven't really got how does LaTeX understand the objects created through \operatorname{…}/\DeclareMathOperator. I know that it typesets them in upright roman, but how the system treats it?
When should I use those commands in order that LaTeX treats that functions as operators.
$d(x,y)$$\operatorname{d}(x,y)$$\mathit{Var}(x)$$\operatorname{Var}(x)$$P(X=x)$$\operatorname{P}(X=x)$$E[X]$$\operatorname{E}[X]$$\mathit{Bin}(n,p)$$\operatorname{Bin}(n,p)$$B(\ell,\varepsilon)$$\operatorname{B}(\ell,\varepsilon)$$O(x)$$\operatorname{O}(x)$\sigma = \mathit{id}\sigma = \operatorname{id}
d(x,y) means the distance, Var the variance of a distribution, P the probability, E the average (or mean of a distribution), Bin the binomial distribution, B the ball with center l and radius epsilon, O the Big O notation.
In those examples, which ones should be treated by LaTeX as operators? And then be typeset upright.
May be my problem is that I don't really understand what an operator is (apart from it's meaning in LaTeX).
EDIT: well, as @cgnieder says, this can be off topic. The problem, why I thought this wasn't off topic is that I've never thought about operators and upright roman out of the LaTeX world. Basically because I don't change the shape when I handwrite math. Therefore, I do think this is (La)TeX related. Sorry for editing instead of adding a comment, but my connection doesn't allow me to do so.
EDIT2: I didn't want to include the differential operator in the list, as it has its own question.

\intfor example) or some string (\maxfor example) which needs (or expect to) some argument after it. For example,\maxof what? Or\intof what function? Of course, you can use these commands without argument but I believe that they need extra space after them. – Sigur Jan 26 '13 at 14:47sinandcos,minandmax, etc... usually these "operators" are typeset in upright roman, whereas ordinary functions are traditionally typeset as italicized Latin letters such as f, g, h, etc... – EthanAlvaree Dec 07 '14 at 09:50