In many texts, I have seen the following definition of continuity at a closed interval:

Let $f: [a,b] \to \mathbb{R}$. Let $x \in [a,b]$. Then $f$ is continuous at $x \in (a,b)$ if $\lim\_{y \to x}f(y) = f(x)$ and for $x = a$, if $\lim\_{y \to a+} f(y) = f(a)$ (similarly for $b$).

I really don't see the need in distinguishing the endpoints in the definition, because $\lim\_{x \to a} f(x)$ is equal to the right limit, provided one of the two exists.

Can someone clarify?