#species?

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

#species?

Fernando Rodriguez
Hi,

        I still don't understand very well the need for the species
message. Could someone enlighten me? O:-)


Reply | Threaded
Open this post in threaded view
|

Re: #species?

Sean M-4
> I still don't understand very well the need for the species
> message. Could someone enlighten me? O:-)

Yeah I thought this was a weird one when I first came across it.

I asked the question in a blog post and got a couple of answers:

http://www.cincomsmalltalk.com/userblogs/malby/blogView?showComments=true&entry=3267396096

"Answer the preferred class for reconstructing the receiver. For example,
collections create new collections whenever enumeration messages such as
collect: or select: are invoked. The new kind of collection is determined by
the species of the original collection. Species and class are not always the
same. For example, the species of Interval is Array."