In finite dimensional vector spaces, orthonormality is defined as $\langle x_i|x_j \rangle=\delta_{ij}$ and the completeness relation is given simply by $$I = \sum_i |x_i\rangle\langle x_i|.$$ To me, the most obvious extension of this finite dimensional case to infinite dimensions is to keep orthonormality as $\langle x|y \rangle=\delta_{xy}$, while the completeness relation is $$I = \int |x\rangle\langle x|.\qquad(\ast)$$ Now in quantum mechanics, orthonormality of basis vectors $|x\rangle$ and $|y\rangle$ in an infinite dimensional vector space is **usually** defined as $\langle x|y \rangle=\delta(x-y)$, while the completeness relation is given by $$I = \int |x\rangle\langle x| dx.$$ It seems to me, however, that my extension of orthonormality and completeness to infinite dimensions is equivalent to the usual extension. As a demonstration that my version of completeness is consistent with my definition of orthonormality, let $| f\rangle$ be some arbitrary linear combination (integral) of basis vectors $|x\rangle$: $$|f\rangle = \int f(x) |x\rangle dx.$$ Applying my version of the completeness relation to it: \begin{align} \int |x\rangle\langle x|f\rangle &= \int |x\rangle\langle x|\left(\int f(y) |y\rangle dy\right)\\ &= \int\int f(y)|x\rangle\langle x|y\rangle dy\\ &= \int\int f(y)|x\rangle\delta_{xy} dy\\ &= \int f(y)|y\rangle dy\\ &= |f\rangle \end{align} so equation $(\ast)$ does work as the completeness relation. Is there anything wrong with defining things this way? If not, then why is the usual definition of orthonormality and completeness preferred?