Nick Sabalausky wrote:
"Yigal Chripun" <yigal...@gmail.com> wrote in message
news:hjek8e$4j...@digitalmars.com...
uint a, b; // init to whatever
bool c, d; // ditto
auto r1 = a AND b; // a & b
auto r2 = c AND d; // c && d
...
AND stands for whatever *single* syntax is chosen for this.
Yuck, that amounts to language-enforced operator overloading abuse, just
like the common mis-design of overloading '+' to mean both 'add' and
'concat'.
That exists for the assignment operator too (which happens to be a
misnomer).
lhs = rhs;
may mean, without any user overloading:
a) assign (destroy the value of lhs and copy the value of rhs)
b) let lhs provide access to the same object that rhs is providing
access to (as a side effect, if lhs was the single reference to lhs's
object, then the object may be destroyed in the future)
The behavior depends on whether the type is a value type or a reference
type.
Ali