Slashdot Mirror


7 Swift 2 Enhancements iOS Devs Will Love

snydeq writes: InfoWorld's Paul Solt outlines how Apple has made good on Swift's emphasis on performance, approachability, and ease in its latest update, offering up seven worthwhile enhancements to Swift 2, along with code samples. 'Many of the enhancements to Swift, through both the Swift 2.0 update and subsequent Swift 2.1 update, have made the language more explicit and intentional, and in turns, Swift 2 code will be safer and easier to maintain for years to come (especially now that Swift is open source). New language constructs (keywords) in Swift 2 improve the readability of control flow — the order in which lines of code are executed. Thanks to these new keywords, collaborating on Swift code will be much more productive and efficient.'

1 of 123 comments (clear)

  1. Swift is making Rust obsolete already! by Anonymous Coward · · Score: 0, Troll

    The most critical thing to understand about Swift is that it's rendering Rust completely obsolete.

    Rust was trying to fill the niche between C and C++ on one side, and C# and Java on the other. Rust wants to be low-level, but it also tries to be high-level, too, and without the VM baggage that Java and C# bring.

    But now Swift has come along, and it fits much better than Rust does. Unlike Rust, Swift is a developer-friendly language. It's not there to force an ever-changing "right way" on programmers, like Rust tends to. For example, Rust's supporters tell you that "inheritance is bad, you should use composition" even when the tool you need is inheritance, and if you question them they essentially tell you to fuck off. Swift, on the other hand, provides real OO, and it's a pleasure to use.

    Now that Swift is open source and is going cross platform, the few benefits of Rust are dwindling away to nothing. It's even more important to note that Apple is backing Swift, while Mozilla is backing Rust. As anyone who follows the industry knows, Apple is wildly successful and innovative, with a bright future ahead of it. Mozilla, on the other hand, has been struggling lately. Users are rapidly fleeing Firefox, the only real product Mozilla has these days. Mozilla has also had its share of internal turmoil, especially with how the best CEO Mozilla ever had was forced out merely because of his beliefs about marriage, of all things. I have much more faith in an Apple-sponsored language being around in 5 or 10 years than I do in Mozilla itself surviving that long.

    Mozilla, if they have any sense, would strongly consider dumping Rust in favor of Swift. Swift is the language they need for their Servo browser engine, even if they don't realize it yet. Swift is the future, and Rust is a failure.