Related to: Question about $x\mapsto f(x)$ notation.
Is there a way to write $f = \text{some expression}$, and thus define a function without a domain or a variable? A function is too often defined as a relation between $f(x)$ and some expression, but I'm curious if there's a way to talk about a function without having to write
$$\begin{align}f: &\quad\cdot\to\cdot\\&x\mapsto x^2\end{align}$$
which is overly complicated. I've seen $f = (x\mapsto x^2)$, but I'm not sure if this is standard or if there are other, more common, alternatives.
The answer is no. A function as commonly understood always come with a domain and co-domain. This is why the problem of finding the domain of a given function is a bit silly.
That said, one can consider for example polynomials (as a ring). Here the elements in the ring aren't defined as functions, but they can of course be viewed as functions (with domain the ring that the coefficients live in). Likewise it is possible that in other cases "functions" can be viewed as elements in their own right. I don't think this is what you are looking for, I just wanted to bring it to your attention.
Edit: Answering the comment below: Functions always have domains. When we, for example, talk about the function $f(x) = x^2$ in calculus the domain is implied. And the domain is the subset of real numbers where the expression is defined. Now, you ask whether the "squaring" should be able to be a function without domain, but the problem is that to square something you need an operation. In the real numbers $x^2$ concretely means the product of $x$ with itself. Now imagine that you had a function $f$ defined on vectors, what does squaring mean? The point is that saying "squaring" only makes sense when you have an operation. And you can't have an operation without a set. So there will always be a domain.