Overloading the assignment operator, right now!
Georg Wrede
georg.wrede at nospam.org
Thu Sep 14 16:51:18 PDT 2006
Hasan Aljudy wrote:
> Georg Wrede wrote:
>
>> Overloading of the assignment operator is not allowed in D.
>>
>> But no problem, we can do it right now, in spite of it.
>>
>> Just overload the opCatAssign operator instead, and use ~= where =
>> would be used.
>>
>> This way we might gather enough use cases to really know whether it is
>> good or bad in practice.
>
> <snip>
>
> Why do you have to think in C++ when coding in D?
I don't. Do you?
Seriously, if you look back in the archives, I've been pretty voluminous
in my support of several ideas and opinions. Getting assignment operator
overload hasn't been one of them.
Then again, some other people have really wanted it, and I stumbled on a
method to try it out with, which I wrote here. Now they can try it out,
without Walter having to make changes to the language.
More information about the Digitalmars-d
mailing list