Oh no, you're thinking, yet another cookie pop-up. Well, sorry, it's the law. We measure how many people read us, and ensure you see relevant ads, by storing cookies on your device. If you're cool with that, hit “Accept all Cookies”. For more info and to customize your settings, hit “Customize Settings”.

Review and manage your consent

Here's an overview of our use of cookies, similar technologies and how to manage them. You can also change your choices at any time, by hitting the “Your Consent Options” link on the site's footer.

Manage Cookie Preferences
  • These cookies are strictly necessary so that you can navigate the site as normal and use all features. Without these cookies we cannot provide you with the service that you expect.

  • These cookies are used to make advertising messages more relevant to you. They perform functions like preventing the same ad from continuously reappearing, ensuring that ads are properly displayed for advertisers, and in some cases selecting advertisements that are based on your interests.

  • These cookies collect information in aggregate form to help us understand how our websites are being used. They allow us to count visits and traffic sources so that we can measure and improve the performance of our sites. If people say no to these cookies, we do not know how many people have visited and we cannot monitor performance.

See also our Cookie policy and Privacy policy.

This article is more than 1 year old

Swift gets swifter: Apple updates its new programming language

Better Objective C interop, fixes and new features in Swift 1.2

Apple's Swift programming language has been enhanced with new features and an upgraded compiler, in the just-released beta version of Xcode 6.3.

Swift was announced at Apple’s WWDC event in June 2014 and version 1.0 was released with Xcode 6.0 (Apple’s IDE for OSX and iOS) in September 2014, with version 1.1 following soon after. It is a modern, safer alternative to Objective-C, and compiles to native code using the open source LLVM compiler.

The newly released Swift 1.2 has better interoperability with Objective-C, including the ability to export enums to Objective-C, and on the Objective-C side, the ability to define nullable pointers and blocks. This makes it easier to write Swift code that uses Objective-C libraries.

There is also a new Set data structure, for collections of unique elements, which bridges with NSSet in Objective-C.

Other enhancements cover let constants, static methods and properties in classes, and type inference for closures. There are also several language changes to tighten up Swift and make it more consistent, and some fixes for previous incorrect behaviour. Full details are in the Xcode 6.3 beta release notes on Apple’s developer site.

A source code migrator tool in Xcode 6.3 converts source code from Swift 1.1 to 1.2.

The 1.2 compiler now features incremental builds, improving build times by not recompiling unchanged files, as well as better optimization, diagnostics and stability.

Swift has been taken up rapidly by developers. Redmonk’s Stephen O’Grady ranks languages according to their popularity on the GitHub code repository and the Stack Overflow programming community. Objective C is ranked at 10 in January 2015, but O’Grady writes that:

“The growth that Swift experienced is essentially unprecedented in the history of these rankings.. Swift has gone from our 68th ranked language during Q3 to number 22 this quarter, a jump of 46 spots … Given this dramatic ascension, it seems reasonable to expect that the Q3 rankings this year will see Swift as a Top 20 language.”

Swift growth or what?

More information is on the official Swift blog here

 

Similar topics

TIP US OFF

Send us news


Other stories you might like