In set theory, map $f:X\rightarrow Y$ is interpreted to be a subset of the product $X\times Y$ satisfying some properties. If $X=\varnothing$ then $f \subseteq \varnothing\times Y = \varnothing$ and all empty maps are the same regardless of whether they have different codomains $Y$.
However, it is said that it matters what the codomain of a map is. If $f:X\rightarrow Y$ and $f':X\rightarrow Y'$ and the two codomains are different, then $f\ne f'$.
So what gives? If $f:\varnothing\rightarrow Y$ and $f':\varnothing\rightarrow Y'$ are maps, are the two maps equal or not? Does the answer depend on the choice of foundations you use?
Edit: I think at this point, I'm just looking for a citation that defines functions in terms of set theory keeping domains and codomains in mind.
There are two incompatible yet closely related definitions of what a function is. One definition states that a function is a triple $(X,Y,F)$ such that $F\subseteq{X\times{Y}}$ and $\forall{x\in{X}},\exists{y\in{Y}},\{\{x\},\{x,y\}\}\in{F}$ and $\forall{x\in{X}},\forall{y,y'\in{Y}},\left(\{\{x\},\{x.y\}\},\{\{x\},\{x,y\}\}\in{F}\implies{y=y'}\right)$. This definition is more closely aligned with the category-theoretic notion of a morphism in the category of sets. Under this definition, $(X,Y,F)$ and $(X,Y',F)$ are different functions if $Y\neq{Y'}$. As such, under this definition, every empty function is different.
Another definition, more commonly used in most other contexts, is that $F$ itself is the function. Under this definition, $F$ is invariant under a change from $Y$ to $Y'$. This implies that "the" codomain of $F$ is not unique, in this definition: it can be any superset of $F[X]$. As such, under this definition, the empty function, or empty map, is unique, and is just equal to the empty set itself. For this reason, it is common to hear about mathematicians talking about "the" empty function.
Some authors prefer to keep the notion of "function" and "map" as separate and distinct, while still allowing for both definitions to be used. In that case, $F$ is taken to be a function, and $(X,Y,F)$ is taken to be a map, or a morphism, in category-theoretic terms. Having both definitions available but distinct is probably the most useful way to go about this, but the issue is that many other authors use the words "function" and "map" interchangeably.