Array: Difference between revisions
Content added Content deleted
Line 215: | Line 215: | ||
* OrderedCollection - variable size, indexed by integer index, any kind of element |
* OrderedCollection - variable size, indexed by integer index, any kind of element |
||
* Dictionary - variable size, indexed by arbitrary object as index, any kind of element |
* Dictionary - variable size, indexed by arbitrary object as index, any kind of element |
||
<br> |
|||
Array, ByteArray, String and all other collection types provide a common protocol which they inherit from their common superclass, <tt>Collection</tt>. ByteArray and String can be considered as Arrays with a more compact storage representation internally (but provide additional protocol eg. for case conversion or bit-array operations). |
Array, ByteArray, String and all other collection types provide a common protocol which they inherit from their common superclass, <tt>Collection</tt>. ByteArray and String can be considered as Arrays with a more compact storage representation internally (but provide additional protocol eg. for case conversion or bit-array operations). |
||
In Smalltalk, a character is exactly that: a character with a code point, not to be confused with a byte valued integer. Thus Strings and ByteArrays are different things (as opposed to eg. C language). |
In Smalltalk, a character is exactly that: a character with a code point, not to be confused with a byte valued integer. Thus Strings and ByteArrays are different things (as opposed to eg. in the C language). |
||
Array |
Array |