42 elements directly within the object and a grow operation can only be done |
42 elements directly within the object and a grow operation can only be done |
43 by #becoming another object. |
43 by #becoming another object. |
44 (other collections keep a reference to the physical container, which |
44 (other collections keep a reference to the physical container, which |
45 can be easily replaced) |
45 can be easily replaced) |
46 |
46 |
47 Notice: |
47 [Warning:] |
48 currently, ST/X supports growing fix-size collections |
48 currently, ST/X supports growing fix-size collections |
49 (such as Arrays, ByteArrays and Strings). However, this |
49 (such as Arrays, ByteArrays and Strings). However, this |
50 is done in a very slow way (using #become). |
50 is done in a very slow way (using #become). |
51 Become is a very slow operation in a direct-pointer smalltalk |
51 Become is a very slow operation in a direct-pointer smalltalk |
52 system. |
52 system. |
53 |
53 \ |
54 Therefore, you SHOULD rewrite any application that do this, |
54 Therefore, you SHOULD rewrite any application that does this, |
55 to make use of OrderedCollection or any other collection which |
55 to make use of OrderedCollections or any other collection which |
56 can grow faster. |
56 can grow faster. |
57 To remind you of that, a warning message is sent to the |
57 To remind you of that, a warning message is sent to the |
58 standard error whenever such an operation is performed (see #grow). |
58 standard error whenever such an operation is performed (see #grow). |
59 |
59 \ |
60 Also note, that some other smalltalk systems do NOT allow |
60 Also note, that some other smalltalk systems do NOT allow |
61 fix size collection to change their size, and that future |
61 fix size collection to change their size, and that future |
62 ST/X versions may be changed to trigger an error (instead of a |
62 ST/X versions may be changed to trigger an error (instead of a |
63 warning) in those situations. |
63 warning) in those situations. |
64 |
64 |
65 [author:] |
65 [author:] |
66 Claus Gittinger |
66 Claus Gittinger |
67 |
67 |
68 [see also:] |
68 [see also:] |
69 OrderedCollection |
69 OrderedCollection Array |
70 " |
70 " |
71 ! ! |
71 ! ! |
72 |
72 |
73 !ArrayedCollection class methodsFor:'instance creation'! |
73 !ArrayedCollection class methodsFor:'instance creation'! |
74 |
74 |