What makes it necessary to define the graph of a function $f:A\rightarrow B$ as $$\{(x,f(x))\mid x\in A\}$$ which makes it a subset of $A\times B$, when this is equal to the function itself, which is defined to be a left-unique and left-defined relation from $A$ to $B$ — and thus a subset of $A\times B$, too?
EDIT: I disagree that with this set-based approach information about the domain and range would get lost, because as I perceived it, there is no definition of a “function”, but rather of a “function from A to B”, in mathematical terms: $f$ is a function from $A$ to $B:\Leftrightarrow f$ is a relation between $A$ and $B \land \forall a\in A\exists! b\in B: (a,b)\in f$.
If we now want to construct some definitions regarding functions, we do not write “Let $f\subset A\times B$”, but rather write “let $f$ be a function from $A$ to $B$”. This makes by definition $f\subset A\times B$, but also preserves the additional information as the domain etc.