"I guess that's used to build the
'traits' that are used for faster/typed oo accesses."
 
What is meant by 'traits' in this context?  I've heard people say AS3 is a 'trait-based' language.  What does that really mean?
 
Jim Kremens
AS1, AS2 and _javascript_ are prototype-based languages.
It means each object instance carry its own prototype that can be muted (it's initialy a copy of the class prototype).
So you can for example rebind a method at runtime.
It takes also more memory since all fields tables are duplicated for each instance.
 
Traits based OO is a single prototype for each class that is *shared* between all instances of this class. It can't be muted so you're sure binding together the object and its methods. It consumes less memory and enable faster accesses for method calls.
 
Nicolas
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to