Order of learning measure theory and functional analysis 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.
 A: There appears to be a consensus that measure theory should be learned before functional analysis. Some evidence is presented below, from Real and Functional Analysis, Third Edition, by Serge Lang.

This book is meant as a text for a first year graduate course in analysis. Any standard course in undergraduate analysis will constitute sufficient preparation for its understanding, for instance, my Undergraduate  Analysis. I assume that the reader is acquainted with notions of uniform  convergence and the like.
In this third edition, I have reorganized the book by covering  integration before functional analysis. Such a rearrangement fits the way courses are taught in all the places I know of. I have added a number of examples and exercises, as well as some material about integration on the real line (e.g. on Dirac sequence approximation and on Fourier analysis), and some material on functional analysis (e.g. the theory of the Gelfand transform in Chapter XVI). These upgrade previous exercises to sections in the text.
In a sense, the subject matter covers the same topics as elementary calculus, viz. linear algebra, differentiation and integration. This time, however, these subjects are treated in a manner suitable for the training of professionals, i.e. people who will use the tools in further  investigations, be it in mathematics, or physics, or what have you.
...

A: 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. :)
A: In my undergrad, a first course in measure theory was offered alongside a first course in functional analysis and this seemed to cause few problems. The prerequisites for measure theory were (primarily) a good grounding in real analysis and the theory of metric spaces. For functional analysis, confidence with real analysis and linear algebra should be sufficient; familiarity with metric and topological spaces will be helpful.
As angryavian points out, the Lebesgue integral features prominently in functional analysis. However, most of what is presented in a measure theory course will probably not be necessary to understand the fundamentals of functional analysis (normed vector spaces, bounded linear operators, Banach spaces, Hilbert spaces).
In short, there is some interdependence between the two areas, but I personally don't see this as significant enough to be a genuine obstacle to learning either at a basic level. If I was forced to choose between the two, I would probably opt for measure theory first due to the Lebesgue integral.
A: I'm in the "Measure and Integration before Functional Analysis" camp.
While the Lebesgue integral is useful to discuss examples in Functional Analysis, it is not a necessary ingredient. So, technically, both courses are largely independent. The issue then becomes one of maturity.
Measure and Integration can be seen as a new twist in Real Analysis and requires no more prerequisites than a solid understanding of "epsilon and delta" and basic set theory. One learns a "new language", but it is mostly self-contained.
Functional Analysis does require a deeper knowledge of set topology, so it is a bit heavier on the pre-requisite side. But, most importantly, the ideas are more abstract and require more mathematical maturity.
My experience as an undergrad was to take Measure and Integration as a third-year class, following mostly Rudin's Real and Complex Analysis (so, abstract measures and not just Lebesgue measure); and then Functional Analysis a year later. Even with one more year under my belt, Functional Analysis was definitely harder than Measure and Integration. My experience teaching both classes seems to agree with this; students seem to fit way quicker with the "measure theory" way of thinking than with Functional Analysis.
