On Tue, 29 Oct 2002, Austin Hastings wrote:
> Hell, we might as well throw in multiple dispatch.
Actually, I am really hoping we do.
> Any of you OO guys know of a case where
>
> $a = $a + $b; # @A [+]= @B; --> @A = @A [+] @B;
>
> and
>
> $a += $b; # @A [+=] @B;
>
> should be different?
Any time that evaluating $a produces a side effect--for example,
if $a is a tied variable implementing a counter and increments itself by
one every time its value is fetched. If it started with a value of 5,
then $a += 3 leaves it with a value of 8, but $a = $a + 3 leaves it with a
value of 9.
Dave Storrs