Analysis of information sources in references of the Wikipedia article "元类" in Chinese language version.
To define a new class, select a class category in the first pane of the browse window. This selection specifies the category to which the new class will be added, and causes a template to appear in the largest pane of the browse window, the code pane. ……
The template presented in the code pane looks as followsClass new title: ’NameofClass’
subclassof: Object
fields: ’names of fields’
declare: ’names of class variables’
__call__($self, /, *args, **kwargs)……Call self as a function.
type itself has an __abstractmethods__ descriptor …… __abstractmethods__ should only be set once on a type, in abc.ABCMeta.__new__ ……
I am the root of the class hierarchy. My instances are metaclasses, one for each real class. My instances have a single instance, which they hold onto, which is the class that they are the metaclass of. I provide methods for creation of actual class objects from metaclass object, and the creation of metaclass objects, which are my instances. If this is confusing to you, it should be...the Smalltalk metaclass system is strange and complex.
__call__($self, /, *args, **kwargs)……Call self as a function.
To define a new class, select a class category in the first pane of the browse window. This selection specifies the category to which the new class will be added, and causes a template to appear in the largest pane of the browse window, the code pane. ……
The template presented in the code pane looks as followsClass new title: ’NameofClass’
subclassof: Object
fields: ’names of fields’
declare: ’names of class variables’
The most puzzling strange idea – at least to me as a new outsider – was the introduction of metaclasses (really just to make instance initialization a little easier – a very minor improvement over what Smalltalk-76 did quite reasonably already). Peter’s 1989 comment is typical and true: “metaclasses have proven confusing to many users, and perhaps in the balance more confusing than valuable.” …… My guess is that Smalltalk had moved into the final phase I mentioned at the beginning of this story, in which a way of doing things finally gets canonized into an inflexible belief structure.