Derivative at a boundary or limit point, Heine definition of limit I have recently read this post on the differentiability of a function at a boundary point. The answer recieving the top vote created a new definition that can lead to the derivative at a limit point.

Definition Let $S\subseteq \mathbb{R}$, and $f$ a $\mathbb{R}$-valued function defined over $S$. Let $x\in S$ be a limit point of $S$. Then we say that $f$ is differentiable at $x$ if there exists a linear function $L$ such that for every sequence of points $x_n\in S$ different from $x$ but converging to $x$, we have that $$ \lim_{n\to\infty} \frac{f(x_n) - f(x) - L(x_n-x)}{|x_n - x|} = 0 $$

While I understand the basic idea of this definition, I am a little bit confused with the absolute value bar in the denominator and the linear function $L$ in the numerator. When I first saw this definition, it reminded me of Heine's definition of limit, so I proposed the definition down below.

Definition  Let $S\subseteq \mathbb{R}$, and $f$ a $\mathbb{R}$-valued function defined over $S$. Let $x\in S$ be a limit point of $S$. Then we say that $f$ is differentiable at $x$, if there exists a value k such that for every sequence of points $x_{n} \in S$ different from x but converging to x, we have $$\lim_{n \to \infty} \frac{f(x_{n}) - f(x)}{x_{n} - x} = k$$

Since x is a limit point, I think the above definition is a direct result of Heine's definition of limit. So is this definition accurate? If so, why did the original answerer include an absolute value bar and adopted the linear function?
Also, can we as well use Heine definition of limit to define continuity? Although this is not related to the question above (you don't have to answer), I wonder if we limit a function's domain to all rational numbers, theorems such as the intermediate value theorem will still hold.
 A: Your definition is okay. It is equivalent to the first definiton from the accepted answer to Differentiablility over closed intervals :
First note that for a function $\phi$ we have $\lim_{n\to\infty} \phi(x_n) = 0$ if and only if $\lim_{n \to \infty} \lvert \phi(x_n) \rvert = 0$.
Applying this to $\frac{f(z) - f(x) - L(z-x)}{|z - x|}$ and once more to $\frac{f(z) - f(x) - L(z-x)}{z - x}$ we see that
$\lim_{n\to\infty} \frac{f(x_n) - f(x) - L(x_n-x)}{|x_n - x|} = 0$ if and only if $\lim_{n\to\infty} \frac{ f(x_n) - f(x) - L(x_n-x) }{x_n - x} = 0$. In other words, it is irrelevant whether or not the absolute value is used in the denominator.
Linear maps $L :\mathbb R \to \mathbb R$ have the form $L(z) = kz$ with a unique $k \in \mathbb R$. Thus we have
$$\frac{f(x_n) - f(x) - L(x_n-x)}{x_n - x}  = \frac{f(x_n) - f(x) - k(x_n-x)}{(x_n - x)} = \frac{f(x_n) - f(x)}{x_n - x} - k .$$
Therefore $\lim_{n\to\infty} \frac{f(x_n) - f(x) - L(x_n-x)}{|x_n - x|} = 0$ if and only if $\lim_{n\to\infty} \frac{f(x_n) - f(x)}{x_n - x} - k = 0$. The latter means $\lim_{n\to\infty} \frac{f(x_n) - f(x)}{x_n - x} = k$.
The reason for the apparently more complicated form of the first definition is mentioned as advantage no. 3 in the answer to Differentiablility over closed intervals :

It easily generalises to higher dimensions, and vector valued functions. Just let $f$ take values in $\mathbb R^n$, and let the domain $S \subset \mathbb R^d$. The rest of the definition remains unchanged.

In higher dimensions it is impossible to divide by $x_n - x$, this explains the use of the norm in the denominator.
This is nicely explained in the context  of multivariable calculus. See also here.
