-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.”
-d > On Oct 26, 2016, at 6:26 AM, Rimantas Liubertas via swift-evolution > <swift-evolution@swift.org> wrote: > > 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. > > -1 > > 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. > 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. > 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 > operator. > 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". > > Removing ?: gains nothing and loses a lot, I'd say. > > Best regards, > Rimantas > _______________________________________________ > swift-evolution mailing list > swift-evolution@swift.org > https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution