Vedea := :=: :== operators and their use

Adam Ruppe destructionator at gmail.com
Fri Aug 5 12:49:04 PDT 2011


This sounds like it's just special syntax over functions like
Qt's connect(signal, slot).

I think the way I'd do it in D is probably just a connect method.

textbox.text.connect(slider.value);

But operator overloading could probably be used too - set opAssign()
to call connect().

To get the current value of the property, another method can be
used:

string text = textbox.text.current;


You could overload opAssign to treat other Observer properties
differently than regular types.


More information about the Digitalmars-d mailing list