<html><body><div>I agree with Erica. The ?? operator is very readable IMO.<br></div><div><br data-mce-bogus="1"></div><div>Furthermore x?(false).isEmpty looks like it would evaluate false.isEmpty when x is nil which is certainly not what is intended.<br data-mce-bogus="1"></div><div>In addition it would not be clear which default should be used in case of multiple optional chainings happening, i.e. what should be the result of person?(false).address?.(true).isEmpty<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>-Thorsten</div><div><br data-mce-bogus="1"></div><div><br>Am 26. Januar 2016 um 03:29 schrieb Erica Sadun via swift-evolution <swift-evolution@swift.org>:<br><br><div><blockquote type="cite"><div class="msg-quote"><div class="_stretch"><span class="body-text-content">Not loving this. I'm quite happy with ??-coalescing and don't see<br>a compelling reason it needs to be "cleaner". I find your suggested<br>enhancement less readable. Looks like an optional chaining across <br>a function.<br><br>-- E<br><br><blockquote type="cite" class="quoted-plain-text">On Jan 25, 2016, at 7:03 PM, Amir Michail via swift-evolution <swift-evolution@swift.org> wrote:</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Examples:</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">* instead of x ?? false, you would have x?(false)</blockquote><blockquote type="cite" class="quoted-plain-text">* instead of x?.isEmpty ?? false, you would have x?(false).isEmpty</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">I think this change would result in cleaner looking code.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">_______________________________________________</blockquote><blockquote type="cite" class="quoted-plain-text">swift-evolution mailing list</blockquote><blockquote type="cite" class="quoted-plain-text"><a href="mailto:swift-evolution@swift.org" data-mce-href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br data-mce-bogus="1"></blockquote><blockquote type="cite" class="quoted-plain-text"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" data-mce-href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br data-mce-bogus="1"></blockquote><br>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" data-mce-href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" data-mce-href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></span></div></div></blockquote></div></div></body></html>