Peter Hall peterjoel at
Thu Jun 29 05:33:49 PDT 2006

Nicholas, what is your view of how reflection is implemented in AS3?
That is, as an XML dump of the object's traits table. AS3 reflection
has a dependency on e4x, of course, which might be problematic since
e4x is an optional extension. But I likewise feel that Reflection
should, in any case, be an optional extension, as opposed to part of
the core language.

> For instance, when an unknown field is accessed in ActionScript2,
> __resolve is called instead (if exists). It has an argument which is the
> field name.
> When an object is used as a function and called, the __call method could
> be invoked with the list of arguments.

Do you have a criticism of AS3's Proxy class? Personally, I think it
is cleaner and more transparent. However, it could do with some
extension to bring the functionality up to the same level (that is,
being able to essentially turn any existing dynamic object into a
proxy). For that, Proxy would have to be made a special case for
compile-time type-checking and have the ability to override the "as",
"is" and "instanceof" operators (and probably others).

More information about the Es4-discuss mailing list