Forgive me if this does not belong here.
All throughout primary school I've seen the notation $f(x)$ to denote a function, that is, if we are talking about the squaring function, we would write
$$ f(x) = x^2 $$
to denote/define the function (IIRC this notation was invented by Euler).
However, in the past few years I've been introduced to the notation
$$ x \mapsto x^2 $$
when talking about an anonymous function that we don't need to give a name (and as someone who does functional programming I find it very intuitive and useful).
My question is, should we prefer
$$ f(x) = x^2 $$
or
$$ f \colon x \mapsto x^2 $$
when defining a function with a name. It seems to me the former is more common, but wouldn't it make sense to use the latter to be consistent with anonymous functions? What's the standard in professional mathematics (e.g. papers)? Does anyone think one is more readable than the other?
Oh, and I've also seen
$$ f(x) := x^2 $$
as another alternative.