can someone explain me this?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

can someone explain me this?

EstebanLM
Smalltalk allClassesAndTraits size. "5057"
Object withAllSubclasses size. “9900"

I really do not understand :)

Esteban
Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

Nicolas Cellier
You should try something like (Object withAllSubclasses reject: #isMeta) size...
Also maybe start with ProtoObject...

In Squeak, I have
((Smalltalk allClassesAndTraits reject: #isTrait) difference: (ProtoObject withAllSubclasses reject: #isMeta)) size = 0

2015-05-21 22:14 GMT+02:00 Esteban Lorenzano <[hidden email]>:
Smalltalk allClassesAndTraits size. "5057"
Object withAllSubclasses size. “9900"

I really do not understand :)

Esteban

Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

Marcus Denker-4
In reply to this post by EstebanLM

> On 21 May 2015, at 22:14, Esteban Lorenzano <[hidden email]> wrote:
>
> Smalltalk allClassesAndTraits size. "5057"
> Object withAllSubclasses size. “9900"
>
> I really do not understand :)
>

Metaclasses. For every X there is "X class” which is (eventually) a subclass of Object, too.

        Marcus




Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

NorbertHartl
In reply to this post by EstebanLM

> Am 21.05.2015 um 22:14 schrieb Esteban Lorenzano <[hidden email]>:
>
> Smalltalk allClassesAndTraits size. "5057"
> Object withAllSubclasses size. “9900"
>
> I really do not understand :)

And I enjoy those times that you do not understand something. Makes me feel closer to you :P

Norbert



Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

EstebanLM
In reply to this post by Marcus Denker-4

> On 21 May 2015, at 23:52, Marcus Denker <[hidden email]> wrote:
>
>
>> On 21 May 2015, at 22:14, Esteban Lorenzano <[hidden email]> wrote:
>>
>> Smalltalk allClassesAndTraits size. "5057"
>> Object withAllSubclasses size. “9900"
>>
>> I really do not understand :)
>>
>
> Metaclasses. For every X there is "X class” which is (eventually) a subclass of Object, too.

right… got it :P

>
> Marcus
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

Eliot Miranda-2
In reply to this post by EstebanLM
Hi All,

On May 21, 2015, at 1:14 PM, Esteban Lorenzano <[hidden email]> wrote:

> Smalltalk allClassesAndTraits size. "5057"
> Object withAllSubclasses size. “9900"

As others have said, meta classes account for many of these, but I would have expect something closer to twice as many.  What does this tell you?

(IdentitySet withAll: (Object withAllSubclasses reject: [:b| b isMeta])
        removeAll: Smalltalk allClassesAndTraits;
        yourself

Are there perhaps lots of obsolete classes that need cleaning up?


> I really do not understand :)
>
> Esteban

Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

Eliot Miranda-2
Oops, my math was wrong and so I got it wrong way round.  But you know what I mean...

Eliot (phone)

On May 22, 2015, at 8:37 AM, Eliot Miranda <[hidden email]> wrote:

> Hi All,
>
> On May 21, 2015, at 1:14 PM, Esteban Lorenzano <[hidden email]> wrote:
>
>> Smalltalk allClassesAndTraits size. "5057"
>> Object withAllSubclasses size. “9900"
>
> As others have said, meta classes account for many of these, but I would have expect something closer to twice as many.  What does this tell you?
>
> (IdentitySet withAll: (Object withAllSubclasses reject: [:b| b isMeta])
>        removeAll: Smalltalk allClassesAndTraits;
>        yourself
>
> Are there perhaps lots of obsolete classes that need cleaning up?
>
>
>> I really do not understand :)
>>
>> Esteban

Reply | Threaded
Open this post in threaded view
|

Re: can someone explain me this?

Alejandro Infante
If you remove the Traits you get exactly the double (at least in my moose image).

As far as I remember, Traits are not subclasses of Objects and they do not have a metaclass for each Trait.

Cheers,
Alejandro

> On May 22, 2015, at 12:39 PM, Eliot Miranda <[hidden email]> wrote:
>
> Oops, my math was wrong and so I got it wrong way round.  But you know what I mean...
>
> Eliot (phone)
>
> On May 22, 2015, at 8:37 AM, Eliot Miranda <[hidden email]> wrote:
>
>> Hi All,
>>
>> On May 21, 2015, at 1:14 PM, Esteban Lorenzano <[hidden email]> wrote:
>>
>>> Smalltalk allClassesAndTraits size. "5057"
>>> Object withAllSubclasses size. “9900"
>>
>> As others have said, meta classes account for many of these, but I would have expect something closer to twice as many.  What does this tell you?
>>
>> (IdentitySet withAll: (Object withAllSubclasses reject: [:b| b isMeta])
>>       removeAll: Smalltalk allClassesAndTraits;
>>       yourself
>>
>> Are there perhaps lots of obsolete classes that need cleaning up?
>>
>>
>>> I really do not understand :)
>>>
>>> Esteban
>