Is it necessary for the homsets to be disjoint in a category? In defining a (locally small) category, some books include the condition that if $A\neq C$ or $B\neq D$, then $\hom(A,B)$ and $\hom(C,D)$ are disjoint sets. Is it necessary?
 A: Yes, this is (almost) correct. Every morphism should have a specified domain and codomain. For example, the inclusion $\mathbb{Q} \to \mathbb{R}$ should not be confused with the identity $\mathbb{Q} \to \mathbb{Q}$. The inclusion is not an epimorphism, but the identity is of course an isomorphism.
Actually the "correct" definition of a category is a tuple $(M,O,s,t,\circ,\mathrm{id})$, where $(M,O,s,t)$ is a (possibly large) directed graph, $M$ being the set of edges, $O$ the set of nodes, $s$ the map which assigns to each edge its source, and $t$ the map which assigns to each edge its target, and besides we have a map $\circ : M \times_{t,O,s} M \to M$ (composition) as as well as a map $\mathrm{id} : O \to M$ (identity) satisfying the usual conditions.
By replacing "maps" with "morphisms" here, this definition can be written down in every category with fiber products (internalization), leading to the notion of "category object" and in particular (after adding inverses) "groupoid object", which is useful in algebraic geometry as well as algebraic topology.
As you see, there are no hom-sets here. But you can define them as the pullbacks $\hom(x,y) = \{x\} \times_O M \times_O \{y\}$. For a category theorist, it isn't really sensible to ask for disjointness of these sets, since this is a question of set theory, not invariant under equivalences of categories (which has been called evil in a former nlab article). But the source and target maps $s$ and $t$ allow us to recover $x,y$ from a morphism $x \to y$.
