H (Hybrid) Language - v0.03, by Dr. Herong Yang
Objects Are Created from Classes
This section describes the concept of objects created by classes.
The first concept of Object-Oriented programming is that all objects are created by classes.
In other words, to create a new object, you must invoke the construction function of a given class.
Examples of new object creations:
# create a new object of the built-in class "integer" integer(9); # create a new object of the built-in class "array" array(1,2,3); # define a new class "dummy" $class dummy: {}; #create a new object of the class "dummy" dummy();
Table of Contents
What Is Object-Oriented Programming
►Objects Are Created from Classes
Literal Is Special Form of Object Creation
Dot (.) Expression to Access Object Members
Update Object with Object Methods
Inheritance - Object Attachments