Login  Register

#species?

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

#species?

Fernando Rodriguez
44 posts
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
| More
Print post
Permalink

Re: #species?

Sean M-4
41 posts
> 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."