Hello,

become replaces all pointers to the object to point to some other
object. That means that for instance code running in background, that
was working with object a will be working with object b the next
moment. This can cause all kind of things to break...

If somebody debugs your code and doesn't know of the become, he reads
the code and cannot see why method "a1" returns object "a" and later,
when he debugs method b1, the object is "b". Additionally, pointers in
methods pointing to a can cause the VM to crash if a was an integral
object.

Proxies catch the "doesNotUnderstand" exception and do a dynamic
lookup using a mechanism that is not the normal method call. This can
be hard to debug to - but it has less chance of a VM crash.

Regards, Markus

2011/5/2 [email protected] <[email protected]>:
>
> I've heard that become: is considered to be magic
> and should be avoided and replaced by either AOP or proxies,
>
> I googled a little but I couldn't find anything more concrete.
>
> Does anybody have any link or opinion about that?
> I'd be glad to hear something more about it.
>
> Thx
>
> --
> Tato zpráva byla vytvořena převratným poštovním klientem Opery:
> http://www.opera.com/mail/
>
>

Reply via email to