{"id":14632,"date":"2016-05-25T11:45:30","date_gmt":"2016-05-25T15:45:30","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=14632"},"modified":"2016-06-01T11:35:30","modified_gmt":"2016-06-01T15:35:30","slug":"when-to-move-to-swift","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/05\/25\/when-to-move-to-swift\/","title":{"rendered":"When to Move to Swift"},"content":{"rendered":"<p><a href=\"http:\/\/khanlou.com\/2016\/05\/six-months-of-swift\/\">Soroush Khanlou<\/a>:<\/p>\n<blockquote cite=\"http:\/\/khanlou.com\/2016\/05\/six-months-of-swift\/\"><p>Despite this newfound revelation, I still think the prudent choice is to continue writing apps in Objective-C. Those who are fully on board with Swift commonly reply: every line of Objective-C you write is a legacy. While this is true, Objective-C code will still be viable for at least another five years, and probably won&rsquo;t stop working for closer to 10 or 15. This is based the fact that every one of Apple&rsquo;s OSes is written in it, as well as the frameworks themselves. (How long did Carbon code work for? How long before Finder was rewritten in Cocoa?)<\/p><p>However, your Swift 2.2 project is also going to become legacy code, and that transition will happen <em>this September<\/em>. Your migration will be a bloodbath, and it will have to happen in one fell swoop (including your dependencies!) because of a lack of ABI compatibility. Latent bugs will creep in from the migrator, and you&rsquo;ll have to keep your <code>swift-3<\/code> branch updated with regular, messy merges. In the end, <code>git bisect<\/code> will stop working, and your compile times will still be awful.<\/p><\/blockquote>\n<p><a href=\"https:\/\/medium.com\/@sandofsky\/why-big-apps-arent-moving-to-swift-yet-f8e9a89ef661#.78d4ev11k\">Ben Sandofsky<\/a> (via <a href=\"http:\/\/daringfireball.net\/linked\/2016\/05\/24\/sandofsky-swift\">John Gruber<\/a>):<\/p>\n<blockquote cite=\"https:\/\/medium.com\/@sandofsky\/why-big-apps-arent-moving-to-swift-yet-f8e9a89ef661#.78d4ev11k\"><p>I strongly believe Swift is the future of iOS development. It&rsquo;s only a matter of <em>when<\/em>, and the blocker is the breakneck speed it evolves. For smaller apps, Swift is good enough. For big apps, it&rsquo;s at least a year away.<\/p><p>I&rsquo;m using &ldquo;big&rdquo; as shorthand for a few different categories. It can mean lines of code, number of developers, complexity, or low-tolerance for problems.<\/p><\/blockquote>\n<p>There are pros and cons to both paths. Personally, I lean towards using Swift for new projects and new major versions. I am less worried about the breaking sources changes in Swift 3 than I am about the poor Xcode experience (broken auto-indentation and unreliable syntax highlighting, code completion, and <a href=\"https:\/\/twitter.com\/mjtsai\/status\/735182568304324608\">symbol lookups<\/a>). Nearly two years after the initial release, I thought those would have been fixed.<\/p>\n<p>Previously: <a href=\"http:\/\/mjtsai.com\/blog\/2016\/05\/17\/abi-stability-deferred-until-after-swift-3-0\/\">ABI Stability Deferred Until After Swift 3.0<\/a>.<\/p>\n<p>Update (2016-06-01): <a href=\"https:\/\/github.com\/bridger\/NumberPad\/compare\/swift3\">Bridger Maxwell<\/a> posted a diff of his app&rsquo;s changes for Swift 3 (via <a href=\"https:\/\/twitter.com\/khanlou\/status\/738029660647329792\">Soroush Khanlou<\/a>).<\/p>","protected":false},"excerpt":{"rendered":"<p>Soroush Khanlou: Despite this newfound revelation, I still think the prudent choice is to continue writing apps in Objective-C. Those who are fully on board with Swift commonly reply: every line of Objective-C you write is a legacy. While this is true, Objective-C code will still be viable for at least another five years, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[31,30,71,901,226],"class_list":["post-14632","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-ios","tag-mac","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=14632"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14632\/revisions"}],"predecessor-version":[{"id":14690,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14632\/revisions\/14690"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=14632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=14632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=14632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}