TITLE: What's the purpose of the two different definitions used for limit?
QUESTION [19 upvotes]: In my study on the concept of limit, I've come across two different definitions:
Let's assume that $a \in \bar D$, i.e. $a$ belongs to the closure of the domain of function $f$. Then $\lim_{x\rightarrow a}f(x)=b$

$\forall_{\epsilon>0}\exists_{\delta>0}\forall_{x}\ \ x\in D
    \land|x-a|<\delta\implies |f(x)-b|<\epsilon$
$\forall_{\epsilon>0}\exists_{\delta>0}\forall_{x}\ \ x\in D
    \land(0<|x-a|<\delta)\implies |f(x)-b|<\epsilon$

I've seen definition 1. being used mainly in book written in continental Europe, while definition 2 in books written in USA or UK. I may be wrong though.
The point is that these definitions are clearly very different. For example, if $f$ is equal to $1$ in every point in $\mathcal{R}$ except in $a$, where it's equal to $2$, then according to def.1. the limit doesn't exist at $a$, but according to def.2. it does exist.
Another difference I've notice is in proving the existence of composition of limits, in def1. it will be less demanding than in def2. 
Why would so many books use these different definitions?
Edit: 
Because many of this forum may not be accquainted with def.1, you can check the book called "Multidimensional Real Analysis" by Duistermaat and Kolk, published by Cambridge University Press, where this is given as Definition 1.3.1. Here's an image of the book:

And clearly it's not a typo. (you can check the errata at the book's site.)

REPLY [7 votes]: This is a very interesting question, and has quite a subtle answer, part of which has already been mentioned in some replies. I will try, to the best of my ability, to make matters clearer. To make things simpler, I will only deal with real-valued functions of real variable, though everything holds in a general topological setting.
According to Definition 2, a function $f:D\subseteq \mathbb{R} \to \mathbb{R}$ is said to have limit $b$ when $x$ goes to $a$, if
$$
\forall_{\epsilon >0} \exists_{\delta >0} \forall_{x\in D} \; 0<|x-a|<\delta \Rightarrow |f(x)-b|<\epsilon .
$$
Suppose first that $a$, as you put it, is an adherent point to $D$, i.e. $a\in \overline{D}$. It is quite easy to show that if $a$ is an isolated point, the limit is not unique. Indeed, consider the function $I :D=\{ 0\} \to \mathbb{R}$, defined by
$$
I (x)=x.
$$
Then for all $\epsilon >0$, all $x\in \{ 0\}$, all $\delta >0$ and all $b\in \mathbb{R}$, we have that
$$
0<|x-0|<\delta \Rightarrow |I(x)-b|<\epsilon
$$
is vacuously true, and so $I$ tends to every single real number whenever $x$ goes to $0$. This is definitely not good!
A simple workaround is to make the definition solely for accumulation points, rather than adherent points. (Recall that $a$ is said to be an accumulation point of $D$ if every (open) neighbourhood of $a$ contains a point of $D$ other than $a$ itself). In such case, our poor function $I$ would go from having every single limit possible to having no limit at all whenever $x$ goes to $0$. Strange, but not outrageous.
To see why this workaround leads to issues, we have to dig slightly deeper into the theory. Consider, for instance, the definition of continuous function, as defined by Heine. A function $f:D\subseteq \mathbb{R} \to \mathbb{R}$ is said to be continuous at a point $x_0 \in D$ if
$$
\lim_{x\to x_0} f(x) = f(x_0),
$$
and is said to be continuous if it is continuous at every point of its domain.
In particular, the limit has to exist, and consequently the function $I$ is not continuous at $0$. Even stranger, but still not outrageous.
From here onward, though, the theory quickly crumbles if one is not careful, as well-known "theorems" may suddenly become false statements. Take, for example, the following result:

If $h:H\subseteq \mathbb{R} \to \mathbb{R}$ and $g:G\subseteq \mathbb{R} \to \mathbb{R}$ are two continuous functions, then $g \circ h : \{ x\in H: h(x) \in G \} \to \mathbb{R}$ is continuous.

Take then, for instance, $h(x) = -x$ and $g(x)=\sqrt{x}$, both defined on $\mathbb{R}^{+}_{0}$ and continuous. Then $g\circ h = I$, which we have seen not to be continuous. Oops!
Naturally, these problems ultimately boil down to how carefully definitions are laid out on top of one another. As a counter-argument to this specific example, some authors only define the composition of functions whenever (abusing notation a bit) $h$'s codomain is a subset of $g$'s domain. Others require $h$'s codomain to be equal to $g$'s domain. In both these cases, the example above wouldn't work.
In the end, you just have to be very careful, but I would definitely recommend you using Definition 1 :)