Apple's new Swift coding language hopes to lock down errors

Apple's new Swift coding language hopes to lock down errors
Apple Vice President Craig Federighi didn't have a Steve Jobsian "one more thing" for the faithful at the Worldwide Developers Conference on Monday morning. But he did end on an unexpected note. Apple debuted a new programming language called Swift that the company hopes will make coding faster while eliminating catastrophic errors."We have a new programming language. The language is called Swift, and it totally rules," said Federighi as the crowd exploded with applause. Related storiesApple unveils OS X YosemiteApple announces iOS 8 at WWDC 2014Here's what we learned from Apple's WWDCApple supercharges iOS gaming with MetalFull coverage of Apple's WWDCSwift is native to Apple's Cocoa and Cocoa Touch frameworks on which OS X and iOS are respectively built. Federighi outlined an ambitious goal to replace the Objective-C and Python languages with a single language that is faster and easier to code in."It's impressive that they've managed to develop a full-fledged modern replacement entirely in secret -- as well as a little concerning, given how difficult it can be to evolve a language design in isolation," said Landon Fuller, a developer and the chief technology officer at the developer co-operative firm Plausible Labs."By designing a language like Swift independently, they were able to produce something that interoperates seamlessly with their existing platform," Fuller said.During the keynote address, Apple released a Swift guidebook to the iTunes Store -- a move that underscores how eager Apple is to get developers on the Swift track.Swift promises to be a sort of a holy grail for developers, employing the best of C and Objective C without its compatibility restrictions. It also promises to put an end to the "infinite loop" errors, of which the recent "goto fail" debacle was a part of.Swift promises to blaze past Objective-C and Python, with complex object sort 3.9 times faster and RC4 encryption 220 times faster than Python. Federighi promised that developers simply won't be able to make entire classes of errors that currently plague them, even though code written in Swift will be able to run alongside current Objective-C code.Chris Lattner, Apple's director of developer tools, then took the stage to demo how quickly the language can be tested. He wrote a few lines of code in Swift that assigned values of a variable to the position of a blimp in his demo development environment, and the app was instantly able to show the blimp moving. No building or compiling was required.Although there have been a lot of programming languages introduced in recent years, including Dart, Go, Rust, Haxe, and TypeScript, their progenitors have found it hard to make them stick.Gordon Haff, a Red Hat Linux cloud evangelist and longtime developer advocate, expressed disappointment on Twitter that Apple opted to develop a proprietary language instead of choosing a more open platform.For Apple's operating systems, "if you want to do mobile development, you pretty much have to use what Apple provides," Haff said.That could also be an indicator that Swift will succeed where other languages have languished, because Apple essentially has a captive audience of enthusiastic developers."Whether this has an impact beyond Apple will likely depend on whether Apple makes Swift available as an open-source project," Fuller said. "There's a lot of renewed interest in implementing compiled, efficient, safe languages, and from what I've seen of Swift's design, it's a worthwhile entrant in the space."Corrected at 5:33 p.m. PST Swift is 220 times faster than Python, not Objective-C.Update at 5:04 p.m. PST with additional comments.


New iPads, Apple TV boxes to share 'A5X' chip (report)

New iPads, Apple TV boxes to share 'A5X' chip (report)
Adding to previous chatter, a new report says Apple will unveil a new Apple TV set-top box alongside its next iPad.In a report this afternoon, The Verge says both devices will get their debut at tomorrow morning's special event and that there's a reason for that: they both use the same chip. Citing anonymous sources, The Verge says the chip will be the previously rumored (and photographed) "A5X," versus the A6--the latter being the expected quad-core chip and successor to the dual-core A5, currently used in the iPad 2 and iPhone 4S. Separately, a source told CNET that Apple plans to use a dual-core chip, versus one with four cores.The Verge's report also mentions that Apple's next tablet will feature more RAM than the iPad 2, include the much-rumored 2048x1526 Retina Display, and support 4G LTE, with Apple offering separate models to support the different standards, as it did with the 3G models of the iPad 2. (Note: this is the second such report today to offer that the next iPad will support 4G LTE networks.)As for what's new with the Apple TV set-top box, The Verge says it will get support for 1080p (up from the current model's 720p output), a move tied to the AirPlay mirroring feature that works on the iPhone 4S, iPad 2, and presumably the next iPad. Considering that Apple doesn't offer 1080p content through its iTunes Store, the 720p limitation has made sense, but bigger resolutions will be more important, given the much-rumored higher resolution on the tablet, as well as the upcoming Mountain Lion OS X update, which will let Mac users beam their screens to their TV sets.Related stories4G iPad reportedly slated to be sold by Verizon, AT&TNext iPad will be the iPad HD, not the iPad 3Apple iPad 3 may get March release date, 4GiPad 3 rumor roundupApple TV isn't 1080p and you shouldn't careThe Apple TV--which is not to be confused with Apple's much-rumored, and eventually expected, TV set--has been in short supply in recent weeks, with a report from MacRumors last night noting that you can't find one in 98 percent of Apple's retail stores in the United States. Retailers began discounting the product as long ago as November, with Amazon changing the listing to the "2010" model.Apple is widely expected to take the wraps off the next iPad at its event tomorrow morning, with a new report today claiming that the device will go on sale on March 16. CNET will be there to cover the event live.CNET Blog Network contributor Brooke Crothers contributed to this report.