collections.immutable: Immutable collection classes for AS3

As part of writing a preprocessor for generating AS3 enums, I hit upon the need for a means of passing around a set of enums in a way that couldn’t corrupt the original data. After a bit of thought and digging around the core Flash/ Flex classes, I realised that:

  1. There are no immutable collections in Flash or Flex.
  2. Immutable collections are  fairly easy to create using standard AS3 and the magical Proxy class.

Continue reading “collections.immutable: Immutable collection classes for AS3”