Thank you Nikos.
Here is another proof :
Suppose that \(\displaystyle{D}\) is not dense on \(\displaystyle{\left(X,d\right)}\), that is \(\displaystyle{\overline{D}\neq X}\) .
Then, there exists \(\displaystyle{y\in X}\) such that \(\displaystyle{d(y,D)>0}\) . The function
\(\displaystyle{f:X\longrightarrow \mathbb{R}\,,f(x)=d(x,D)}\) is continuous and \(\displaystyle{f(x)=0\,,\forall\,x\in D\subseteq \overline{D}}\) .
Accoding to the hypothesis, \(\displaystyle{f=\mathbb{O}}\), a contradiction, since \(\displaystyle{f(y)>0}\) .
