[Newbies] Character allInstances size=0 for 5.3 latest
K K Subbu
kksubbu.ml at gmail.com
Sun Mar 1 05:07:13 UTC 2020
On 01/03/20 1:41 AM, Vaidotas Didžbalis wrote:
> Thank you for your explanations, but ... but we have characters in the
> image. Having a characters in the image means that Character has
> instances. If alInstances method cannot report about them, it shall fire
> exception perhaps, or, name allInstances must be changed to something
> else, isn't it?
Instance has two meanings.
* the first one is as you explain it. This is usually the meaning
intended in all textbooks and applies to the overall object model (e.g.
$a isKindOf: Object is true).
* The second one is an object allocated in memory and is the one of most
interest in practice. Such objects need memory allocation, reference
counting and garbage collection services. The method allInstances uses
the word instances in the latter sense. Immediate objects don't need
these services, so they are not considered. (e.g. $a class
isImmediateClass is true).
This is like calling 45, 045 or 0045 as two digit numbers because
leading zeros are not significant in practice.
Could you explain the context behind your question?
Regards .. Subbu
More information about the Beginners