Wich still supports what Normans said. For explaining a suspected difference between instance and object, your example does not fit well because you are basically saying that you need an instance of the fitting subclass for a task.
Sure they do. Any instance of a class is also an object. As I said earlier, to call something an instance (of) is just another view onto the same thing. Object is a generality. To extend Roberts example: Any being is an object. Any being is also an instance of its species: Mammal, reptile And of course at the same time an instance of its subspecies: dog, cat, human And of its sub-sub-species and so on, down to its family.
In terms of code, we mostly view objects from the instance viewpoint: We want to handle a certain class. Because, as Robert stated, not every class matches every purpose. So we ask for certain class instances, like a DateTime, a sound, a picture
But technically, each instance of each class we handle is at the same time an object. Its just the viewpoint we change.
Only rarely like when we use variants , we use the object viewpoint in code ourselves. But in most of the cases we will then still change the viewpoint and ask for the object class when we process the input.
The object viewpoint states (in this example) solely that a being exists. Viewing an object as an instance reveals its class, because by syntax instance cannot stand alone in a sentence. It is always an instance of a class. You dont say “you need to create an object of MainWindow”. But on a more general viewpoint that instance of MainWindow is still an object. But you have to get closer to examine it and view it as an instance of its class to know more about it. In most of the cases.
EDIT: Like you would usually only say “That is the son” if the context is known (Using FamilySmith
). The way more common sentence would be “That is the son of Mr & Mrs Smith.”
EDIT: Under this viewpoint of course one has to agree with Robert again: In Xojo, an object does not have a name if viewed as an object itself. In many other languages, every object will at least have its individual handle.
And in some others, everything is an object.