After (nearly) completing my course in topology, something weird just stuck out to me which I hadn't considered before. When first discussing continuity, we often use the following definition:
Let $X$ and $Y$ be topological spaces. We say that $f:X\to Y$ is continuous if for every open set $V\in Y$, $f^{-1}(V)$ is open in $X$.
This is a rather opaque definition and isn't quite as easily relatable to the notion we develop on $\Bbb R$ as the following definition:
Let $X$ and $Y$ be topological spaces. We say that $f:X\to Y$ is continuous if for each $x\in X$ and neighborhood $V$ containing $f(x)$, there is a neighborhood $U$ of $x$ such that $f(U)\subseteq V$.
These are of course equivalent definitions. However the latter is quite easy to connect to our normal intuition built up from real analysis: if our $x$-values are "close", then our $y$-values must be "close." Pedagogically, why have we somewhat cast away the latter definition as a mere equivalence and opted for the former? Clearly the latter is what led to the former and is, arguably, easier to latch on to. Is this somewhat of a byproduct of the category-theoretic nature of the former (with $f$ being a morphism of topological spaces) and math's general trend towards category-theoretic personifications? Can it also be attributed to early topologists wanting to separate topology from analysis in this way?
You can already see that your version involving neighborhoods is more complicated than the version involving open sets. In general, I find proving things much easier in terms of open sets, and neighborhoods are mainly for doing things that look like calculations.
An important point is that topology is more clearly expressed in terms of open sets. When you talk about topology via a basis of open neighborhoods, it obscures what the topological space actually is. If I topologize the plane where my neighborhoods are the interiors of squares, is that a different topological space than if I take the open discs as neighborhoods?
So if you define the notion of topological space in terms of open sets, you then have (at least) two choices about how to introduce continuous functions:
I think the second choice would obscure things more. Not only do you delay introducing the notion of continuity, but the definition is also resting upon more complex ideas.