In Boyd and Vandenberghe, there is the following definition:
So the the authors first define differentiation at points in the interior of the domain, next, if the domain happens to be open also (interior domain == domain), then $f$ is said to be differentiable.
My question is, what if the domain is closed? Then is $f$ by definition "not differentiable"?
My only concern is that this definition seem to be overly restrictive. Imagine a function that is differentiable everywhere in the interior of the domain, i.e., $f(x) = x^2$ over $[1,2]$ or $([1,2), (1,2])$, then just because the domain is closed (or not open), therefore the function is not differentiable. But the same function $f(x) = x^2$ over $(1,2)$ is differentiable.
Please let me know if my interpretation of the author's definition is correct and whether my concerns are justified.

Saying that a function is differentiable without specifying where is just a shorthand for saying that the function is differentiable at all points in its domain, which does require that the domain be open. This is because to fully discuss diffentiability at a point, you need to examine the behavior of the function in every direction from the point.
If a function does not have an open domain, then it cannot be differentiable at the non-interior points, so when discussing differentiability, you have to specify a set of points instead of just making a blanket assumption of differentiability everywhere.
Saying that $f : [0,1] \to \Bbb R : x \mapsto x^2$ is "not differentiable" simply means that it is not differentiable at every point in $[0,1]$. Which it isn't. It is not differentiable at $x = 0$ or $x = 1$, since it isn't defined on one side of each of those points. But that does not in any way deny its differentiability at every point of $(0,1)$. It just means that when examining the behavior of $f$ at some point $x$ in its domain, you cannot simply assume that $f$ will be differentiable there.