On Thu, Aug 4, 2011 at 9:22 AM, Stéphane Ducasse
<[email protected]>wrote:

>
> On Aug 4, 2011, at 9:10 AM, Jonathan Kelly wrote:
>
> > Hi,
> >
> > firstly, is there somewhere that explains what the icons in the system
> > browser signify? (eg the three coloured dots)?
>
> ... are for collections
>
> >
> > More importantly (to me anyway) ... I'm confused - why at: is defined in
> > Object and not SequenceableCollection?
>
> at: in Object is because some Object like array have variable size
>        #(1 2 3)
>        #()
>        Array new: 6
>
> have all different sizes
>
> How this is encoded? when you create a class you use variableSubclass:
> instead of subclass:
>
> Now how to access such elements?
> using at:
> and this is not only for Array.
>
> BTW Collection subclass: #SequenceableCollection
> so Sequenceable is not a variable class just an abstract class.
>
> Now
> Object>>at: index
>        "Primitive. Assumes receiver is indexable. Answer the value of an
>        indexable element in the receiver. Fail if the argument index is not
> an
>        Integer or is out of bounds. Essential. See Object documentation
>        whatIsAPrimitive. Read the class comment for a discussion about that
> the fact
>        that the index can be a float."
>
>

That's a great explanation. You can read more about that in a post I did a
couple of months ago:
http://marianopeck.wordpress.com/2011/05/07/class-formats-and-compiledmethod-uniqueness/

Those I call "variable" are those where you can use #at:  #at:put: for
example, etc...


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to