For the sake of variety....
The actual practice of mathematics tends to implicitly use more flexible semantics than is actually explicitly described. One interpretation is that semantics not based on functions but on partial functions.
For example, if you've ever really thought through questions like
What is the domain of the function $f(x) = \sqrt{1 - x^2}$?
you'd see that they are very poor questions when taken at face value, when interpreted in the usual way. There are two problems:
- The domain of $f$ is, by definition, the set of values that the variable $x$ ranges over. So there's nothing to prove.
- $1-x^2$ isn't an expression known to be limited to the domain of $\sqrt{}$, so the equation is nonsense anyways.
However, when interpreted in terms of partial functions, the question both makes sense and is meaningful. The function $f$ so defined assigns a value to every $x$ such that $1-x^2$ is in the domain of $\sqrt{}$, and it does not assign a value to any other $x$.
This is a special case of composition of relations.
To resolve ambiguity, when considering a partial function $f:X \to Y$, I will call $X$ and $Y$ the "source" and "target" respectively. The "domain" of $f$ is defined to be the subset of $X$ of values that $f$ assigns a value to.
So if $x$ is a real variable, then the function $f(x) = \sqrt{1-x^2}$ has source $\mathbb{R}$ (the set of real numbers), target $\mathbb{R}$, and domain $[-1,1]$.
Let $I$ denote a set with one element. Recall the notion of "element of a set $S$" is equivalent to the notion of "function $I \to S$". Keeping in the spirit that notation should be more along the lines of partial functions than functions, this means that there should be an idea of a "partial element".
The set of all partial functions from $I \to S$ consists of all ordinary functions and one new partial function: the one whose whose domain is empty.
Switching back to the notion of element, it is not unreasonable to call the partial element of $S$ corresponding to the partial function with empty domain "the undefined element of $S$".
And this matches conventional usage. Recall that if $a$ is a partial element of $S$, $i$ is the corresponding partial function, and $f$ is a partial function $S \to T$, then $f(a)$ is the element of $T$ corresponding to the composite $f \circ i$.
So continuing our example of $f(x) = \sqrt{1-x^2}$, if we follow the above rule to plug in the value $2$, we get that $f(2)$ is the undefined real number.
One awkwardness of this notation is that there's an ambiguity of what "$=$" should mean. Specifically, while $f(2)$ is the undefined real number, it would be reasonable to insist that $f(2) = undefined$ is not a true statement; instead, it is the undefined truth value. I haven't thought through the specifics of this notation enough to have decided how to treat "$=$".
Another feature that comes up in practice is generalized elements, e.g. in the form of indeterminate variables and expressions involving them.
If I define the variable $x$ to be the general real solution to the equation $6^x = 0$, this definition makes sense in terms of generalized elements; it is more or less equivalent to the "undefined real number" described above. And interpreted in the context of generalized elements, it does make sense to say $x \in \emptyset$.