From: George A. Heintzelman (georgeh_at_[hidden])
Date: 2001-05-30 13:17:48
> a = b;
> a = c;
> a = d;
> Equivalent to:
> a = b | c | d;
> But there's a runtime penalty.
I appreciate that you don't allow this syntax, but if you were to
change your mind, I would find the equivalence you state above very
counter-intuitive. I would expect the three assignments to be
equivalent (if there were no intervening statements) to just a = d.
I would expect that:
a = b; a |= c; a |= d;
to be equivalent to
a = b | c | d;
If you ever allow rules to be redefined, please be careful about the interface you decide to use for it. Very important would be the case:
Rule a = <pattern 1>
Rule b = <pattern 2>
Rule c = a | b;
b = <pattern 3>
Now, does using c give you <pattern 1> | < pattern2> or <pattern1> | <pattern3> ? I think I would want it to be the former, but I can see arguments both ways.
But since this isn't done right now, I guess it is mostly a moot point...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk