On Apr 24, 2014, at 8:48 AM, Scott Ribe <scott_r...@elevated-dev.com> wrote:
> On Apr 24, 2014, at 9:21 AM, Roland King <r...@rols.org> wrote: > >> well not if it's actually >> >> x = (x) ?: @"yo"; > > Actually, that will work just fine. Personally, I'd leave off the extraneous > (): > > x = x ?: @"yo"; > > While we're on the subject of obscurities of the ternary operator, if you > really want to offend the "verbosity == clarity" crowd, sprinkle your code > with some of the these: > > (foo ? x : y) = @"yo”; Note that this is a C++-ism; in C, the result of the ternary operator is always an r-value. John. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com