In Types and Programming Languages by Pierce, Section 18.6 Simple Classes in Chapter 18 Imperative Objects says:
We should emphasize that these classes are values, not types. Also we can, if we like, create many classes that generate objects of exactly the same type. In mainstream object-oriented languages like C++ and Java, classes have a more complex status—they are used both as compile-time types and as run-time data structures. This point is discussed further in §19.3.
The only place which Section 19.3 Nominal and Structural Type Systems says about classes is:
These type names play a crucial role in Java’s subtype relation. Whenever a new name is introduced (in a class or interface definition), the programmer explicitly declares which classes and interfaces the new one extends (or, in the case of a new class and an existing interface, “implements”). The compiler checks these declarations to make sure that the facilities provided by the new class or interface really extend those of each super-class or super-interface— this check corresponds to record subtyping in a typed lambda-calculus. The subtype relation is now defined between type names as the reflexive and tran- sitive closure of the declared immediate-subtype relation. If one name has not been declared to be a subtype of another, then it is not.
Does the above quote or some other places in Section 19.3 explain the second highlighted sentence in the first quote from Section 18.6, i.e. why
In mainstream object-oriented languages like C++ and Java, classes have a more complex status—they are used both as compile-time types and as run-time data structures
? (I don't see Section 19.3 mentions that a class is a type of objects in mainstream OO languages, and even explains it.)
In Chapter 18 Imperative Objects, is an interface a type of objects?
In mainstream OO languages (such as Java, C#, I am not sure if C++ has interface),
is an interface a type of objects?
An interface seems to me a type of classes, since many classes can implement the same interface. Since a class is a type of objects, is an interface a kind?
Is an abstract class essentially the same concept as an interface? (In terms of being a type of classes or something else)
in Python, there is another concept "metaclass". Is a metaclass a type of object, a kind, or something else?
I have a related post a while ago: Is the implementation relation between an interface and a class an instantiation or inheritance relation, or neither?. It also introduces concept "metaclass" of Python, and my confusions between interface, class, abstract class, and metaclass. Appreciate if you could also take that into account.
Thanks.