[osflash] AVM2 bytecode
Jim Kremens
kremens at gmail.com
Mon Oct 24 10:07:34 PDT 2005
Thanks!
Jim Kremens
On 10/24/05, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
>
> "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
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20051024/cea4b847/attachment.htm
More information about the osflash
mailing list