B
Bradford Chamberlain
I've been curious for awhile about why C supports some of its binary
operators in an op= format, but not others. For example, why are &=
and |= supported by C, but not &&= and ||=?
For awhile I was guessing that it was because the designers wanted to
avoid 3-character operators, but then I remembered <<= and >>=.
If anyone has any insight into the rationale for this, please let me
know. My sense has been that such operators would occasionally be
useful, and I've considered adding them to my own C-like languages,
but want to be sure I'm not overlooking something subtle.
Thanks very much,
-Brad
operators in an op= format, but not others. For example, why are &=
and |= supported by C, but not &&= and ||=?
For awhile I was guessing that it was because the designers wanted to
avoid 3-character operators, but then I remembered <<= and >>=.
If anyone has any insight into the rationale for this, please let me
know. My sense has been that such operators would occasionally be
useful, and I've considered adding them to my own C-like languages,
but want to be sure I'm not overlooking something subtle.
Thanks very much,
-Brad