How is this metric defined when there is no $k$? Let $\left\{1,2,3\right\}$ be equipped with the discrete topology and $X=\left\{1,2,3\right\}^{\mathbb{Z}}$ with the product-topology. Then one possible metric on $X$ is
$$
d(x,y)=\begin{cases}2^{-k} \text{ with k maximal such that }x_{[-k,k]}=y_{[-k,k]}, & x\neq y\\0, & x=y \end{cases}.
$$
Now let $x\neq y$. What is then $d(x,y)$ if there is no such $k$?
 A: In symbolic dynamics people use similar metrics for spaces of sequences and the motivation for the formulas is always the following: "the longer central block on which two sequences coincide, the closer they are to each other". I think in your undefined case sequences $x$ and $y$ "coincide on block of zero length", so it's tempting to say that you assign distance $d(x, y) = 2^{-0} = 1$ to them (while it's tempting, it's not so true to do it this way, see an addition).
ADDED LATER:
There's a presentation by Schlomo Sternberg, take a look at slide 7. He defines the distance between sequences exactly the same way as in your question. He also notes that convention $\lbrack x_k , x_l \rbrack$ denotes an empty block if $k > l$. Of course, any $\lbrack x_{-i}, x_{+i} \rbrack$ with $i > 0$ denotes an empty block, the "minimal" empty block (in terms of maximal $i$) is $\lbrack x_{1}, x_{-1} \rbrack$. So, the Cristian Blatter's suggestion for $d(x, y) =2 $ when $x \neq y$ seems to be most reasonable.
