I'm working through Vector Calculus, Linear Algebra and Differential Forms: A Unified Approach (5th ed, Hubbard) and on page 91 the author writes
"Limits like $\lim_{x\rightarrow x_0}f(x)$ can only be defined if you can approach $x_0$ by points where $f$ can be evaluated. Thus when $x_0$ is in the closure of the domain of $f$, it makes sense to ask whether the limit $\lim_{x\rightarrow x_0}f(x)$ exists. Of course, this includes the case when $x_0$ is in the domain of $f$; in that case for the limit to exist we must have $$\lim_{x\rightarrow x_0}f(x)=f(x_0).\hspace{5em}(1)$$
But the interesting case is when $x_0$ is in the closure of the domain but not in the domain. For example, does it make sense to speak of $$\lim_{x\rightarrow 0}(1+x)^{1/x}?\hspace{7em}(2)"$$
And on the next page where he defines the limit of a function, he gives the usual definition except that he allows $|x-x_0|=0$ (in his words this makes limits better behaved under composition).
are my statements correct?
If $x_0$ is in the closure of the domain and the domain, then since the author allows $|x-x_0|=0$ in the definition of the limit (and clearly $x_0-x_0=0$), we get the condition (1).
If $x_0$ is in the closure of the domain but not the domain, it is in the boundary of the domain and $|x-x_0|>0$ for all $x$ , so for (2) it does make sense to speak of the limit since we can still approach $x_0$ from points in the domain and since $|x-x_0|>0$ we don't require (1) (or even for $f(x_0)$ to exist, which it cannot since $x_0$ is not in the domain).
I've heard about Hubbard's book but I did not read it, so I don't know what the author mean "this makes limits better behaved under composition".
For example $f(x)=1/x$ is defined in $A=(\mathbb{R} \setminus \left\{ 0\right\})$ , and $0 \in \overline{A}$, but you can't compute $f(x_0)$.
I would also suggest to you to compare the definition that Hubbard gives with another "standard" definition that you can find in a lot of other textbooks, where to evaluate the limit $\lim_{x \to x_0}f(x)$ it is not allowed to take the value $f(x_0)$.
And try to apply the two different definitions to $f(x) = \left\{ \begin{array}{lr} 0 & \text{ if } x < 0 \text{ or } x \gt0\\ 1 & \text{ if } x = 0 \end{array} \right. $