Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-10-13 04:04:14

----- Original Message -----
From: "Juan Carlos Arevalo-Baeza" <jcab.lists_at_[hidden]>

> >In conclusion, I think what should be done instead is to focus on
> >a way to solve the r.alias() nuisance.
> Actually, I'm afraid I have to vote to use the |= and the others anyway (and >>=, now that I
think of it). Yes, it changes the meaning of the expression _slightly_ from r = r | a, but it
changes it from one that is clearly an error (left recursion) to one that approximates the original
meaning without the error.
> And the result is pretty reasonable. IMHO. After all, it also happens to mimic the _normal_
behaviour of assignment operators: x = x + 1 _really_ means x = previous_definition_of_x + 1, which
is a concept that everybody working with C++ understands just fine...


Do you guys still want this addition regardless if there's a simpler solution
to the r.alias() problem which started this discussion?

My worry is that, in C++ (as if we are not in C++ eh? :-),

    a |= b

is equavalent to

    a = a | b

In Spirit (the proposed behavior of |=):

    a |= b

will not be equivalent to:

    a = a | b

In any case, if we allow these new operators, what will all this hoopla buy us?
Will it solve something that's unsolved? Will it give use new capabilities
that were not available before? Are these capabilities compelling enough
to go through all the trouble explaining in the documentation why a |= b
will not behave similarly as a = a | B?


Boost list run by bdawes at, gregod at, cpdaniel at, john at