Every set is a class, but not vice versa. In set theory, sets exists always but classes, in general, do not. For example, the class of sets that aren't members of themselves does not exist as a set, for it would lead to contradictions. In set theory functions are, in general, classes of ordered pairs (you're probably familiar with this). "Reasonable" functions are not only classes of ordered pairs, but sets of ordered pairs. The function you're describing is merely a class of ordered pairs. If X denotes a class, you can do most things with X that you could do with a set. You can make true statements like x \in X for some set x, you can talk about the union of X (that is, the union of the sets in X), the intersection of X (that is, the intersection of the sets in X), subclasses of X, the powerset of X, etc. but there's no guarantee that any of these classes you get are sets. The only thing you can't do is say (\exists y)(y = X).