Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Should Xcode 8 users migrate to Swift 3.0 or simply upgrade to 2.3?

Developers who use Xcode 8 have been faced with a choice: Make the jump to Swift 3.0 or simply upgrade to Swift 2.3. Here's what developers should consider when making the choice.

When Apple released the first version of Swift, they added a word of caution: They expected Swift to change dramatically....

They were right.

Xcode 8 now comes with two versions of Swift: Swift 2.3 and Swift 3.0. The reason for this is simple: Apple made some significant, sweeping changes with 3.0. To make the upgrade easier, take this rule of thumb: If you have written a lot of Swift 2.0 code, migrate to Swift 2.3. But, if possible, jump to Swift 3.0.

Significant changes to Swift include the following:

  • All function parameters have labels by default.
  • Attribute arguments use a colon.
  • Line control statements use the #sourceLocation(file:line) syntax.
  • Dependencies have changed (check that frameworks you are using are upgraded to Swift 3.0 to support your projects).
Developers may want to jump to 3.0 sooner rather than later.

The changes may seem overwhelming, but it can be argued that they are worth applying to your projects because of the improved support and learning tools provided by Apple. For example, iPad users will see that there is a new Swift Playgrounds app as part of iOS 10. While Swift Playgrounds was designed to be used by schools to teach programming, it is also a great tool to brush up on your Swift skills and just have some fun.

If the jump to Swift 3.0 is too much, Swift 2.3 is a short-term solution to help adjust to the changes. However, developers may want to jump to 3.0 sooner rather than later. In addition to running faster code, developers who use Swift 3.0 will have access to new features in Xcode 8 and Apple training tools that will help teams get up to speed quickly.

Next Steps

Learn why Swift is a hit among mobile app developers

How will enterprises benefit from the Apple-SAP deal

Pros and cons of open source models

This was last published in November 2016

Dig Deeper on Microservices and mobile development

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

Which will you choose: Swift 3.0 or 2.3, and why?
Cancel

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide.com

SearchWinDevelopment

DevOpsAgenda

Close