<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">-1 as well, particularly agreeing with Rimantas that removing something of use because it confuses new programmers is not a good motivation. To paraphrase Einstein, “A programming language should be as simple as possible, but no simpler.”</div><div class=""><br class=""></div><div class="">-d</div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 26, 2016, at 6:26 AM, Rimantas Liubertas via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Pitch: I'd like to simplify the syntax, compiler complexity and learning curve for newcomers when it comes to dealing with the ternary function. The best way to do that, in my opinion, is to remove it entirely and add a new function with better semantics that takes care of ternary operations entirely within the Swift language.</div></div></blockquote><div class=""><br class=""></div><div class="">-1</div><div class=""><br class=""></div><div class="">A lot of things can and will be confusing for newcomers, that's not the reason to remove them. Being a newbie is a transitional state.</div><div class="">OTOH, I've never got why ternary is considered especially confusing, for me it never was a problem and I love the terseness of it.</div><div class="">Only total novices in programming may be surprised by it, but they will be suprised by a lot of things anyway, so ternary is the least of their problems. Those with experiene in other languages will be most likely already familiar with the</div><div class="">operator.</div><div class="">Also, many come to Swift from Objective C, which not only has ternary, but also supports a variant where you can use it kind of like ?? in Swift: NSString *other = someString ?: @"default string".</div><div class=""><br class=""></div><div class="">Removing ?: gains nothing and loses a lot, I'd say.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Rimantas</div></div></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>