Is there a natural choice of topology for the set of functions from a space to itself? Is there a natural choice of topology for the set of functions from a space to itself? Particularly one that's well motivated given the categorical definition of an exponential object?
Let $X$ be a topological space with topology $\tau$.
If I have another space $X'$, there's a natural choice of topology for $X \times X'$, namely the box topology. There's a nice story behind why we pick the box topology, namely that it is the intersection of all topologies in which the projections $\pi_1 : X \times X' \to X$ and $\pi_2 : X \times X' \to X'$ are continuous.
I'm curious about $X \to X$ though (not $X \to X'$, for simplicity). I don't want to impose many assumptions on $X$ though, such as assuming that $X$ is $\mathbb{R}$-like or a topological vector space or something.
Here's an attempt to come up with a topology to impose on $X$ that makes no assumptions about $X$ other than that it's a topological space.
One possible topology I can think of for $X \to X$ is to consider the set, $B$, of all singleton sets of continuous functions from $X$ to $X$, along with the empty set. $B$ is closed under intersections, which is nice. This makes it a basis for a topology $\tau^B$.
The continuous maps in $(X \to X) \to (X \to X)$ are the ones that reflect continuity, although they don't necessarily preserve it.
 A: Thanks Asaf Karagila and C. Caruvana for the suggestion to look at the product topology. Here's the Wikipedia page on the product topology. (Incidentally, I mistakenly swapped the box topology and the product topology when writing this question. The product topology is the one that behaves well as a categorical product.)
The general construction combines an indexed family of topological spaces into a single topological space. Let $I$ be an arbitrary index set. Let $\hat{X}$ be the product for disambiguation.
$$ \hat{X} = \prod_{i \in I}X_i $$
Let $\tau^i$ be the topology associated with $X_i$.
Let's define $B^\hat{X}$, subbasis for a topology on $\hat{X}$, as follows.
$a$ is in $B$ if and only if there exists an indexed collection of sets $A_I$ such that $\prod_{i \in I} A_i$ is equal to $A$, $A_i$ is open for all $i$, and $\{ i : A_i = X_i \}$ is cofinite.
$\tau^\hat{X}$ would then be the closure of this set under arbitrary unions and finite intersections as usual.

We get the functions from $X$ to $I$ when all of the $X_i$ are equal.
The elements of our basis $B^\hat{X}$ are now families of functions that are identical at cofinitely many points and vary within an open set at the points in their domain where they aren't constrained to be identical.
