TITLE: Classes, sets and Russell's paradox
QUESTION [14 upvotes]: As I understand, Russell's paradox demonstrates that not every class can be regarded as a set. He defines
$$S:=\{x: x \text{ is a set such that }x\notin x\}$$
Assuming that $S$ is a set, this gives a contradiction. However, if in the above definition we replace "set" by "class", we find that $S$ cannot be a class. In other words, the paradox can be used for any structure, not just sets.
My (naïve) understanding is that a set can be identified as a single object, while that's not necessarily true for classes, which can be any collection of objects. If that is true, then in the above definition we could not say things like "$x$ is a class such that…" since it identifies the class as a single object $x$. That would seem to resolve my confusion, but I saw in books sentences like "Let $A$ and $B$ be classes…" which confuse me further, since they again refer to classes (which are not necessarily sets) as individual objects $A$ and $B$.
Surely my reasoning is wrong. What am I missing? What is the difference between a class and a set?

REPLY [3 votes]: In a system like MK (Morse-Kelley) set theory where there are two sorts, intended to be one for sets and one for classes in general, we can indeed construct (as an object in the system) any class of the form $\{ x : Set(x) \land φ(x) \}$, where $Set$ is the predicate corresponding to the sort intended for sets. It is then possible to prove that this object is not a set, via Russell's proof. Namely in MK you would be able to prove the following sentence:

$\neg Set(\{ x : Set(x) \land x \notin x \})$.

Note that there is little point in having the predicate $Class$ corresponding to the sort intended for classes, because in MK we have essentially that $\forall x\ ( Class(x) )$.
In practice when working in MK we say "$x$ is a set" to mean "$Set(x)$" and "$x$ is a class" to mean "$Class(x)$", which we just mentioned is totally redundant since everything is a class in MK. Well why do people still say it then? It is because most mathematical work actually is based on some informal type theory (see this article by De Bruijn and this book), and so we think of each object actually as having a type, rather than being a set or class!
Now if you want to work in ZFC completely, then you cannot even talk about classes in the same way, since they are not even objects in the system. In ZFC, we can only define classes in the limited sense that we can define new predicate-symbols, if our system supports definitorial expansion. So the Russell class does not exist as an object in the system, but we can define the predicate-symbol $Russell$ as follows:

Let $Russell$ be a $1$-place predicate such that $\forall x\ ( Russell(x) \equiv x \notin x )$.

Being a predicate-symbol rather than a collection, it makes no sense to ask whether $Russell$ is a member of itself. Likewise, in ZFC "$x \in S$" when $S$ is a class should be considered as syntactic sugar for "$S(x)$". That is the precise sense in which we can handle classes in pure ZFC. Similarly, using definitorial expansion we can handle class-functions, because defining them amounts to defining new function-symbols. For example in ZFC the power-set function-symbol "$\mathcal{P}$" is not a function but a class-function.