TITLE: Order of learning measure theory and functional analysis
QUESTION [5 upvotes]: Guiding question:Should measure theory be learned before functional analysis or should it be the other way around?
Perhaps there is no largely agreed upon answer to this so I'll ask:
More specific question: What connections are there between the two subjects that might make a person choose to study one before the next?
All feedback is appreciated.

REPLY [3 votes]: It is certainly true that, to be in sync with other beginners (and more!), as in the quote from Serge Lang, one should do measure theory (etc) first.
And, yes, since that is nowadays the standard, most often the Banach spaces considered in "functional analysis" are $L^p$ spaces on abstract measure spaces... which, due to the disconnection from topology, are not immediately accessible from the world of continuous functions on a topological space.
But, if we are willing to forego abstract measure spaces (as do many intro real analysis books), and just consider functions on pieces of $\mathbb R^n$ or other concrete (topological) spaces, we can use Riemann-style integrals on continuous (etc.) functions to define $L^p$-norms! And say that the $L^p$ space is the completion...
Yes, even then, there is the immediate issue that pointwise (or $L^p$-) limits of continuous functions are not necessarily/obviously Riemann-integrable.
So, yes, this might give us motivation to find a motivation to be able to "integrate" pointwise limits of (at least) continuous functions.
On another hand, there are very, very natural classical spaces of functions that do not require fancier notions of integration: the spaces $C^k[a,b]$ of $k$-times continuously differentiable functions... with norm the max of the sup norms of the derivatives. The fundamental theorem of calculus shows that these are Banach spaces.
Also, there is the Riesz-Kakutani-Markov theorem, which is taken up by Bourbaki as the route to "define" integrals in many cases: that "integration" is an extension-by-continuity (meaning!?!) from compactly-supported continuous functions (where the Riemann integral gives an "integral").
(In my real analysis and functional analysis courses in recent years I've tried to emphasize these options, as well as describing the by-now-traditional viewpoints.)
Operationally, going toooo far down a measure-theory-pathology rabbit-hole is not useful, although possibly interesting in its own right. Rather, in essentially all the practice I've seen, the Riesz-Markov-Kakutani uniqueness-and-existence result confirms what we'd imagine, and there is scant reason to worry about whatever goofy/pathological functions might exist as pointwise limits of sequences of continuous functions... beyond the preliminary cautionary examples.
I myself certainly did learn the measure-theory canon... but after a while realized that in many/most other parts of mathematics the dangerous pitfall pathologies we can create set-theoretically do not arise in practice, at least on a good day. The things more relevant to practice (esp. in math-physics), are the kind of practical_math things that the most-interesting parts of functional analysis address.
... and/but, yes, there is an accumulation of "pure" functional analysis results which were difficult to obtain, and addressed existing issues, ... but do not have much bearing on other parts of mathematical practice. So the notion of "functional analysis course" is very vague. :)
(In every course, some things are included because they are landmarks, even if not useful... but some things are very useful. The narrative too often does not distinguish.)
EDIT: and, as in math-physics practice, often it's not the definition of an "integral" that is needed, but its properties. Lebesgue's notion of integral was/is very robust... but/and the point is that it achieves certain goals, even if people did not explicitly think in such terms in those days. It surely bears emphasizing that L's very general definition of integral made_sense_of integrating quite wild functions, ... so did allow us to return to the practical/important issue of when limits and integrals could be exchanged (L's Monotone Cvgce thm, and Dominated...)
It is surely worth mentioning that those theorems about interchanging limits and integrals are useful, whether or not one worries about how to "define" an integral of a potentially-wild sequence of functions. :)