How does topology on a space relate to differentiation? I read in Chapter 1 of Lee's Introduction to Smooth Manifolds that 

there's no way to define a purely topological property that would serve as a criterion for smoothness.

So, I tried to think about the meaning of this sentence and I couldn't really link topology to differentiation! I mean derivatives of functions are defined on open domains, and openness is a topological abstract concept. But how are the two related? I mean assume that I change the topology of the real line from the Euclidean metric to some other topology. For example, discrete topology or the topology generated by half-open intervals $[a,b)$. How will the notion of differentiation change then?
I assume we have to study functions defined on $\mathbb{R}$ to answer this. So, some examples of functions that are differentiable with respect to the Euclidean topology but fail to be differentiable in some other topology or vice versa are appreciated.
 A: As far as I can guess what Lee might have meant, on the basic level, the reason is that smoothness properties are not preserved by homeomorphisms, and hence smoothness of a function is not a topological property.
There is no need to go into exotic topologies (where it doesn't a priori make sense to talk about smoothness${}^\dagger$). For example, the identity function on the real line is certainly smooth, but if you compose it with a non-smooth homeomorphism of the line (say, a piecewise linear strictly increasing function), you will get a non-smooth function.
On a somewhat deeper level, you can have two differential manifolds which are homeomorphic, but have incompatible differential structures, such as regular and exotic spheres.
($\dagger$ There are more robust notions of smoothness and manifolds than those of real manifolds. For example, given any local field (like the $p$-adics), you can pretty much rewrite the standard definitions of smoothness and a manifold and they work just fine. But I am not aware of any such notion which would work for the lower limit topology.)
