I suggest you to read the chapter on the Smalltalk model in the Squeak
or pharo by example book
the key is:
when you look for a message you look in the CLASS of the receiver
then its superclasses.
So when you look for new sent to Array you should look in the Array
class superclasses and you will see it contains
Behavior before ProtoObject
Stef
PS: you can sent to the mailing-list just register to it. You do not
need to have a google account.
On Oct 7, 2009, at 1:00 PM, Petr Vácha wrote:
> Hi again,
> when try to find out that Array>>new: bug I found one thing that I
> think
> may be very confusing - somehow mangled information from hierarchy
> browsers
> (see figure).
>
> Array>>new: calls primitive and uses self>>basicNew: call as fallback.
> Array does not implement basicNew: so I tried to find implementors of
> it. Behavior has this implementation. However, when you show hierarchy
> of Array, it ends in ProtoObject with no Behavior involved. I think
> this to be is somewhat confusing for beginners especially when they
> are trying to get into method lookup chain.
>
> Petr Vacha
>
>
> <pharo-browsers.jpg>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project