Pages: [1]   Go Down
  Print  
Author Topic: Swift 1.2 features an improved compiler and Objective-C interactions  (Read 487 times)
HCK
Global Moderator
Hero Member
*****
Posts: 79425



« on: February 10, 2015, 09:00:25 am »

Swift 1.2 features an improved compiler and Objective-C interactions

<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p><a href='http://www.imore.com/swift-12-features-improved-compiler-and-objective-c-interactions' title="Swift 1.2 features an improved compiler and Objective-C interactions"><img src='http://www.imore.com/sites/imore.com/files/styles/large_wm_blw/public/field/image/2015/02/swift-logo-iphone6-hero.jpg?itok=nAbUoVPB' />[/url]</p> <p>Apple's youngest programming language, Swift, received a fairly substantial update with today's first beta of Xcode 6.3, at least in beta form. The Swift 1.2 beta features an improved compiler that's both more stable and more speedy, as well as new Objective-C (the programming language that pre-Swift iOS apps were built on) interactions for building more capable hybrid apps.</p> <!--break--> <p>Here's what's new in the compiler:</p>
<ul><li>Incremental builds — Source files that haven't changed will no longer be re-compiled by default, which will significantly improve build times for most common cases. Larger structural changes to your code may still require multiple files to be rebuilt.</li> <li>Faster executables — Debug builds produce binaries that run considerably faster, and new optimizations deliver even better Release build performance.</li> <li>Better compiler diagnostics — Clearer error and warning messages, along with new Fix-its, make it easier to write proper Swift 1.2 code.</li> <li>Stability improvements — The most common compiler crashes have been fixed. You should also see fewer SourceKit warnings within the Xcode editor.</li> </ul>
<p>In addition to the enhanced and improved compiler, Swift 1.2 also features improvements to the language itself:</p>
<ul><li>as! for failable casts — Casts that can fail at runtime are now expressed with the new as! operator to make their potential for runtime failure clear to readers and maintainers of your code.</li> <li>Nullability may now be expressed in Objective-C headers — New Objective-C extensions in Clang allow you to express the nullability of pointers and blocks in your Objective-C API. You can provide Objective-C frameworks that work great with Swift code, and improve your Swift experience when mixing and matching with Objective-C code in your own project.</li> <li>Swift enums can now be exported to Objective-C using the @objc attribute.</li> <li>let constants are now more powerful and consistent — The new rule is that a let constant must be initialized before use (like a var), and that it may only be initialized, not reassigned or mutated after initialization.</li> <li>More powerful optional unwrapping with if let — The if let construct can now unwrap multiple optionals at once, as well as include intervening boolean conditions. This lets you express conditional control flow without unnecessary nesting.</li> <li>New native Set data structure — An unordered collection of unique elements that bridges with NSSet and provides value semantics like Array and Dictionary.</li> </ul>
<p>As this is a beta of Swift 1.2 these features are, naturally, subject to change in behavior and implementation, and might not work perfectly out of this preliminary gate. But if you're in the developer beta program, definitely check it out and see what you can do with these new additions to the language.</p> <p>Source: Apple</p> </div></div></div><div id="comment-wrapper-nid-29865"></div><img width='1' height='1' src='http://tipb.com.feedsportal.com/c/33998/f/616881/s/43361f65/sc/4/mf.gif' border='0'/><br clear='all'/>

<a href="http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/rc/1/rc.img" border="0"/>[/url]
<a href="http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/rc/2/rc.img" border="0"/>[/url]
<a href="http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/rc/3/rc.img" border="0"/>[/url]

<img src="[url]http://da.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/a2.img" border="0"/>[/url]<img width="1" height="1" src="http://pi.feedsportal.com/r/218611638072/u/49/f/616881/c/33998/s/43361f65/sc/4/a2t.img" border="0"/><img src="//feeds.feedburner.com/~r/TheIphoneBlog/~4/4hbkVh_wsUQ" height="1" width="1" alt=""/>

Source: Swift 1.2 features an improved compiler and Objective-C interactions
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: