ImmutableArray.st
changeset 12470 f666ff3600cf
parent 12463 6b3a71aad451
child 12492 d63fd473f6e7
--- a/ImmutableArray.st	Thu Nov 05 15:37:59 2009 +0100
+++ b/ImmutableArray.st	Thu Nov 05 15:42:44 2009 +0100
@@ -55,6 +55,15 @@
     Turn the ImmutableArray feature on by setting the Parsers class variable
     'ArraysAreImmutable' to true or use the new launchers settings menu.
 
+
+    ATTENTION:
+        there may be still code around which checks for explicit class being Array
+        (both in Smalltalk and in primitive code). All code like foo 'class == Array'
+        or '__isArray' will not work with ImmutableArrays.
+        A somewhat better approach would be to either add a flag to the object (mutability)
+        and check this dynamically (expensive) or to place immutable objects into a readonly
+        memory segment (the good solution). We will eventually implement the second in the future...
+
     [see also:]
         ImmutableString
         Parser Scanner
@@ -205,9 +214,9 @@
 !ImmutableArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.25 2009-11-05 14:37:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.26 2009-11-05 14:42:44 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.25 2009-11-05 14:37:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ImmutableArray.st,v 1.26 2009-11-05 14:42:44 cg Exp $'
 ! !