What is the "right" universal property of the completion of a metric space? I'm a little embarrassed to ask this one, but it could help for a class I'm teaching, so here goes:
Let $X$ be a metric space.  We all know that $X$ admits a completion, which is a complete metric space $\hat{X}$ together with an isometric embedding $\iota: X \hookrightarrow \hat{X}$ with dense image.  Moreover, one learns that this completion is essentially unique.
From a modern perspective, one would like to realize the completion as satisfying some universal mapping property: this makes precise the "essentially unique" above and gives some functorial properties.  But it seems to me that the completion satisfies two different such properties:
1) It is universal with respect to isometric embeddings into complete metric spaces.
2) It is universal with respect to uniformly continuous maps into complete metric spaces.  
Of course 1) is the more obvious one.  I gather from some internet research that 2) is supposed to be the "right" choice, and its usefulness is related to the fact that uniformly continuous maps have the extension property (again, I don't quite remember this from my undegraduate days; is it in Rudin's Principles, for instance?).  However, it seems strange to me that by taking 2), we also get for free that the mapping $\iota$ is an isometric embedding (in particular, from 2) it doesn't even seem completely obvious that it is injective).  Certainly one can see this by constructing the completion, but is there a more direct way?
I suspect that this is an instance when the more categorical thinkers have one up on me, and I stand ready to be enlightened.
 A: The canonical universal property (in so far as it is given as an example in Maclane's book :P ) can be stated: the full subcategory of complete metric spaces is reflective in the category of metric spaces and uniformly continuous maps, and the completion functor is the reflector.
A: Dear Pete,
I want to give a proof that if $X$ is a metric space, and if $x_0$ and $x_1$ are two
distinct points of $X$, then there is a map
$f:X \rightarrow Y$ that is uniformly continuous, with $Y$ complete, and such that 
$f(x_0) \neq f(x_1)$.   The main point is that my proof won't refer to the completion
$\widehat{X}$ of $X$.  It will then give a proof that $X \rightarrow \widehat{X}$ is
necessarily injective, without refering to the construction of $\widehat{X}$.
The construction is simple: take $Y = {\mathbb R}$, and define
$f(x) = d(x,x_0).$
(Note: slightly edited from the first version, which had unnecessary complications
in the definition of $f$.)
A: Mike Shulman give the impression here that understanding the completion of a uniform space is a little trickier than for a metric space:

Cauchy completion of a metric space
  is, of course, an instance of Cauchy
  completion of enriched categories. I
  believe that Cauchy completion of a
  uniform space is actually also an
  instance of a general categorical
  notion of Cauchy completion, but in
  the more general setting of an
  equipment (namely, the equipment of
  sets and filters). See "Categorical
  interpretation" at uniform space for a
  too-brief summary of this point of
  view.

A: This doesn't quite answer your questions about (2), but one could say the following:
given a metric, there is an underlying uniform structure.  We can then form the completion
with respect to this uniform structure, which is universal for uniformly continuous maps into complete uniform spaces.  That this map is injective is due to the existence of "enough" complete uniform spaces.  (And to show this, one constructs the completion!  I am still thinking about alternative, less constructive, approaches, to this.)
But I think now one can relate (2) to (1) via the following lemma:
If $X$ is a uniform space, and $d$ is a metric on $X$ inducing the given uniform structure,
then $d$ extends uniquely to the completion of $X$.
Proof: Something along the lines of: $d$ is uniformly continuous from $X \times X$ to
$\mathbb R$, and so extends.
Thus the universal object for (2) had to also be the universal object for (1).
