I were updating my knowledge of category theory, which were generally obtained from the books treating categories not as their primary subject. So, I decided to read books on the subject.
By comparing these texts I discovered that there are several different approaches regarding definition of category:
$\textrm{(CD.a)}$ For category $\mathcal{C}$ with objects $A,B,C,D \in \mathcal{O}_{\mathcal{C}}$ its hom-classes are $\mathcal{M}_{\mathcal{C}}(A,B)$ and $\mathcal{M}_{\mathcal{C}}(C,D)$ are disjoint whenever $A \neq C$ or $B \neq D$.
$\textrm{(CD.b)}$ Each hom-class $\mathcal{M}_{\mathcal{C}}(A,B)$ consists of triples $(A,B,f)$ with only last item $f$ bearing new intrinsic information.
Note that $\textrm{(CD.b)} \Rightarrow \textrm{(CD.a)}$. And it seems that the role of this assertion is to define $\mathrm{dom}$ and $\mathrm{codom}$ as viable maps from class of all the morphisms of $\mathcal{C}$ to the $\mathcal{O}_{\mathcal{C}}$. For example, In case $\textrm(CD.a)$ one can define $$ \mathrm{dom} (A,B,f) = A \kern 1pc \mathrm{codom}(A,B,f) = B. $$
In my fairly limited practice I always selected objects first and morphisms later as elements of corresponding hom-sets, so I rarely addressed $\mathrm{dom}$ and $\mathrm{codom}$ as maps directly. This raised some question for me:
Can property $\mathrm{CD}$ (in every form) be painlessly dropped from definition of category?
Is it useful to have $\mathrm{dom}$ and $\mathrm{codom}$ to be well-defined as maps to develop any useful theorems and tools in category theory? Or фre they just common parts of mathematical lingo?
Have anyone studied objects which are like categories but have $\mathrm{CD}$ dropped from the definition?
If property $\mathrm(CD)$ is dropped then $\mathrm{dom} $ and $\mathrm{codom}$ can be defined at least for small categories as sets:
$$ \mathrm{dom}(f) = \{ A \in \mathcal{O}_{\mathcal{C}} : \exists B \in \mathcal{O}_{\mathcal{C}} : f \in \mathcal{M}_{\mathcal{C}}(A,B) \}, $$
$$ \mathrm{codom}(f) = \{ A \in \mathcal{O}_{\mathcal{C}} : \exists B \in \mathcal{O}_{\mathcal{C}} : f \in \mathcal{M}_{\mathcal{C}}(B,A) \}. $$
I can present examples where this notion is not redundant:
(1)
Consider category $\mathsf{TOP}$ with topological spaces as objects and continuous maps as morphisms. Then $\mathbb{R}$ has multiple corresponding objects in this category, say $(\mathbb{R},a)$ and $(\mathbb{R},b)$ being real numbers with normal ans discrete topologies $a$ and $b$ respectively. And Let $\mathbf{1} = \{1\}$ be a one-point set. Then the constant map $1 : \mathbb{R} \to \{1\}$ belongs both to $\mathcal{M}_{\mathsf{TOP}}((\mathbb{R},a),\mathbf{1})$ and $\mathcal{M}_{\mathsf{TOP}}((\mathbb{R},b),\mathbf{1})$.
(2)
Consider category $\mathsf{SET}$ with objects are sets and morphisms are maps defined along with ZF; I. e. $f : A \to B$ is a subset of $f \subset A \times B $ with the property that $$\forall a \in A \; . \; \exists b \in B : (a,b) \in f \quad \& \quad \forall b,c \in B \; . \; (a,b),(a,c) \in f \Rightarrow a = b.$$
Let $A,B$ are sets and $\emptyset \neq S \subsetneq B$. Then, if $f \in \mathcal{M}_{\mathsf{SET}}(A,S)$ it must also be present in $\mathcal{M}_{\mathsf{SET}}(A,B)$. So $f$ has nonsingular codomain.
You can define the notion of category in any of the language of First-Order Logic with Dependent Sorts (FOLDS) or dependent FOL (DFOL) or as a generalized algebraic theory or in a dependent type theory in such a way that there are no $\mathsf{dom}$/$\mathsf{codom}$ operations and asking whether $\mathsf{Hom}(A,B)$ is or is not disjoint from $\mathsf{Hom}(C,D)$ is a meaningless question. In particular, in these formalizations there is no notion of equality of objects. (There is still a notion of equality of arrows, but we can only ask about it for arrows that are declared to be of the same hom-sort/hom-type.)
This isn't just a neat trick. FOLDS, in particular, was designed to achieve this. Or rather, FOLDS was designed to be a formal language in which one could do category theory and the principle of equivalence (well, the principle of isomorphism) would automatically hold. That is, every property you can state in FOLDS, say, is isomorphism invariant: if the property holds for one object, it holds for all isomorphic objects. Equality of objects is clearly not isomorphism invariant, and so it is not a predicate you can formulate in FOLDS.
To answer your question, yes we can drop CD and the notion of $\mathsf{dom}$ and $\mathsf{codom}$ operations entirely, but we need to restrict ourselves to a language where they are meaningless. But restricting ourselves to such a language is a good thing because properties outside this language do not satisfy the principle of isomorphism (and such properties are often referred to as "evil"). Since strict categories appear to be a thing, I assume they are sometimes useful/necessary. (Normal) FOL and set theory don't really provide a way to formalize the notion of category without including this extraneous structure either explicitly or implicitly, hence the existence of FOLDS and co. In practice, we just informally restrict ourselves (for the most part) to isomorphism invariant properties, so the fact that we are allowed in usual formalizations to test equality of objects and that $\mathsf{dom}$/$\mathsf{codom}$ exist are usually ignored. This is similar to how we simply don't ask questions like is $\mathbb Q\subseteq \arcsin(1)$ even though they are technically legitimate questions in a set-theoretic context.