I'm wondering if there is any definitive style guide for writing mathematics. In particular, I'm looking for rules for when to use '$( \ )$' versus '$[ \ ]$.' For instance, when referring to a function, most texts will write $f(x)$, not $f[x]$. On the other hand, when referring to the expectation of a random variable (which I guess is a function too) most (but not all) texts write $\mathbf{E}[X]$, not $\mathbf{E}(X).$
Is there a reason for this or is it a matter of the personal preference of the author? Are there places where it would be 'wrong' to replace '$( \ )$' with '$[ \ ]$' and vice versa (ignoring cases like interval notation where the mathematical meaning is different)?