Phobos

Ben Phillips Ben_member at pathlink.com
Wed Mar 8 13:38:33 PST 2006


In article <dune2o$cu4$1 at digitaldaemon.com>, Def says...
>
> Array op= operations are not implemented.
>

This has been discussed numerous times and the consensus is that overloading "="
is a bad idea. You must remember that D uses references so if we have a class
and two instances ("a" and "b") then "a = b;" makes "a" refer to the same object
as "b". The programmer should not be allowed to change this behavior.

On the other hand, another operator such as ":=" has been suggested which would
be a copy operator rather than an assignment operator





More information about the Digitalmars-d mailing list