TITLE: Category theory and set theory: just a different language, or different foundation of mathematics?
QUESTION [70 upvotes]: This is a question to research mathematicians, as well as to those concerned with the history and philosophy of mathematics.
I am asking for a reference. In order to make the reference request as precise as possible, I am outlining the background and nature of my questions here:
I did my Ph.D. in probability & statistics in 1994, and my formal mathematics education was completely based on set theory. Recently, I got interested in algebraic topology, and have started to read introductory texts like Allen Hatcher, or Laures & Szymik, and others.
I am struck by the broad usage of category theory and started to wonder:
(1) Is category theory the new language of mathematics, or recently the more preferred language?
(2) Recognizing that set theory can be articulated or founded through category theory (the text from Rosebrugh and Lawvere), is category theory now seen as the foundation of mathematics?
(3) Is the choice between category theory language and set theory language maybe depending on the field of mathematics, i.e. some fields tend to prefer set theory, others category theory?
Edit: On (3), if such a preference actually exists, what is the underlying reason for that?
Would someone be able to give me a good reference for questions like this? I would be very grateful for that.
Later Edit: Just adding the link to a great, related discussion on MO: Could groups be used instead of sets as a foundation of mathematics? It discusses the question whether every mathematical statement could be encoded as a statement about groups, a fascinating thought.
Could groups be used instead of sets as a foundation of mathematics?

REPLY [2 votes]: The underlying reason of the utility of category is structural. This arose in the abstract algebra approach of Noether where the notion of a structure preserving map was isolated - a morphism.
This idea is so basic to mathematics now, that it is baked into category theory whereas in set theory, the notion of a function is a derived concept, never mind that of structure preserving map.
Just as Marx-Engels is said to have turned Hegelian idealism upside-down (not quite true), Eilenberg-Maclane can be said to have turned set theory upside down to construct category theory.
I would also say neither set theory nor category theory is "the language of mathematics". The only language of mathematics is language itself. To see this merely remove all language from any paper and see how easy it is to understand. It isn't usually - it turns into symbol sludge.
One other aspect of category theory has an avatar in physics. This is the notion of covariance which Einstein used so effectively in thinking through what GR entails. One can say that category theory is also a general theory of covariance.
As for a reference, check out the SEP article on Category Theory.