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
