operator and
operator and
- Subject: operator and
- From: Jeff Koftinoff <email@hidden>
- Date: Fri, 21 Dec 2001 10:52:21 -0800
On Friday, December 21, 2001, at 05:41 AM, Ondra Cada wrote:
Jeff,
Jeff Koftinoff (JK) wrote at Thu, 20 Dec 2001 23:24:27 -0800:
JK> {
JK> bool a,b,c;
JK> a and_eq b;
JK> a xor_eq c;
JK> }
JK>
JK> is completely valid standard code.
Valid it surely is. As for its _readability_ though, I would agree with
Vince, and should I have to maintain such code, I'd start with a simple
sed
script ;)
I agree with you on the readability.
Of course, the reason for these 'alternative operator names' is for
people with foreign language keyboards that are missing ~ & |
IMO, these are at least better than the ANSI C trigraph sequences.
normal: a[b] || c ^ d
trigraphs: a??(b??) ??!??! c ??' d
C++: a[b] or c xor d
my point is that
if( a or (b and (not c)) )
is not 'wrong'. Just preference.
Jeff