• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
operator and
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: cocoa-dev digest, Vol 1 #999 - 7 msgs (From: Ondra Cada <email@hidden>)

  • Prev by Date: Merry Christmas everyone
  • Next by Date: Re: Aliases & fileAttributesAtPath:
  • Previous by thread: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • Next by thread: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
  • Index(es):
    • Date
    • Thread