I'm reading a set theory textbook by Pinter, and this book follows the spirit of NBG set theory and talks about sets and (proper) classes in a very early stage. This is quite satisfactory because the book can (and does) talk about 'functions' whose domains are classes, and 'partially ordered classes' and so on.
But the problem is, when Pinter defines functions, he goes on like
A function is a triple of objects $<f,A,B>$ such that...
and similarly, he also says
By a partially ordered class we mean a pair of objects $<A,G>$, where...
without defining what 'a triple of objects' and 'a pair of objects' is.
Of course, this is not a 'serious' defect, but as a set theory book, this is not quite satisfactory. He had given the Karatowski definition of an ordered pair early on,
$(a,b):=\{\{a\},\{a,b\}\}$
but it is clear that this does not make sense when $a,b$ are proper classes. For similar reasons, defining a triple of objects as $((a,b),c)$ would not work.
Is there a way to explain all this in a satisfactory manner?
P.S. This reminds of the situation I had faced when learning category theory for the first time. Almost every algebra or algebraic topology books define category by saying "a category consists of following three data..." without explaining what 'data' really is. Of course this is also not a serious defect when learning, say, algebraic topology, but I would like to resolve the curiosity that I've always had.
Any reasonable coding mechanism suffices. If $X$ and $Y$ are proper classes, you might define the ordered pair $(X, Y)$ as $X \times \{0\} \cup Y \times \{1\}.$ In fact you could code a transfinite sequence of proper classes $\langle X_{\alpha}: \alpha<\beta \rangle$ as $\bigcup X_{\alpha} \times \{\alpha\},$ where $\beta$ is an ordinal or $Ord.$ This kind of situation arises, for example, when iterating a proper class model by an ultrafilter. The coding scheme isn't usually specified since the specific encoding doesn't really matter.