Long time ago in the galaxy far away I did this:
http://code.google.com/p/e4xu/source/browse/trunk/templates/List.as.fdtthese
are templates that FlashDevelop can process. In a certain sense, they
can be used just the same as vectors are used in AS3 with a certain bonus
of possible inheritance and abstraction of similar operations (sorting,
adding, removing and so on). The problem with this approach is the clumsy
syntax and no runtime code generation. (Did you know you could create a
vector of any class at runtime - well, you can, which is nice...)

I would imagine that as3-commons does it better, if you bring it's
libraries for runtime code generation.

Vectors, however, have other disadvantages... when serialized they loose
type information. They are serializable, and AMF has a special tag for
them, but it's halfway there - every vector is sent as a vector of
Object... bah.. no idea what had prevented the implementors from specifying
the actual type, but that's how things are...

Reply via email to