Object Pascal
In Object Pascal, the constructor is similar to a factory method. The only syntactic difference to regular methods is the keyword constructor in front of the name (instead of procedure or function). It can have any name, though the convention is to have Create as prefix, such as in CreateWithFormatting. Creating an instance of a class works like calling a static method of a class: TPerson.Create('Peter').
Read more about this topic: Constructor (object-oriented Programming)
Famous quotes containing the words object and/or pascal:
“Lucifer also has died with God, and from his ashes has arisen a spiteful demon who does not even understand the object of his venture.”
—Albert Camus (19131960)
“Human life is thus only a perpetual illusion; men deceive and flatter each other. No one speaks of us in our presence as he does of us in our absence. Human society is founded on mutual deceit; few friendships would endure if each knew what his friend said of him in his absence, although he then spoke in sincerity and without passion.”
—Blaise Pascal (16231662)