- The Flex built-in primitive collection types (Array, Object, and XML) are not related to each other in a useful way (Array extends Object, but Array is not an associative array).
- The built-in collection operations don't cover enough common use-cases.
Why not?
- Interoperability. If you have existing code that uses Arrays and Objects, then moving to a new type hierarchy will by necessity involve a lot of casting and new Objects. Indeed, if you want to make use of Flex's GUI types, using Array is almost a requirement.
- Sugar. If your new collections framework doesn't inherit from Array or Object, you won't be able to use bracket syntax to retrieve items from or set items into the collection.
A more concrete introduction can be found on the project site: http://code.google.com/p/better-as3-collections/ .
Feel free to check out the unit tests for example uses, or just check out the source!
Hey - this is pretty cool
ReplyDelete