{"id":10510,"date":"2015-01-17T13:59:33","date_gmt":"2015-01-17T18:59:33","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=10510"},"modified":"2015-01-17T13:59:33","modified_gmt":"2015-01-17T18:59:33","slug":"real-world-swift","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/01\/17\/real-world-swift\/","title":{"rendered":"Real World Swift"},"content":{"rendered":"<p><a href=\"http:\/\/making.duolingo.com\/real-world-swift\">Chris Surowiec<\/a> (via <a href=\"https:\/\/iosdevweekly.com\/issues\/181\">iOS Dev Weekly<\/a>):<\/p>\n<blockquote cite=\"http:\/\/making.duolingo.com\/real-world-swift\"><p>Our biggest gripe &#8211; and source of frustration &#8211; with Swift is probably not the language itself, but the tooling around it. Xcode (Apple&rsquo;s Objective-C and Swift IDE) does not yet feel solid with Swift code. During development of our app, the IDE would often slow down noticeably or crash. There was no (or very slow) code completion most of the time, basically no debugger, unstable and unreliable syntax highlighting, a slow text editor (once the project reached a certain size), and no refactoring tools.<\/p><p>Additionally, compiler errors are often incomprehensible and there are still quite a few compiler bugs and missing features (e.g. type inference sometimes goes awry).<\/p><p>[&#8230;]<\/p><p>The number one crash group (at ~30% of all crashes) comes from an external Objective-C library.\nIn fact, four of the top five crash groups come from Objective-C land (the fifth being a failing\nassert, which we leave enabled in production builds).<\/p><p>Also of note, the seventh most common crash comes from the previously mentioned Apple-provided\nObjective-C function that will sometimes <code>@throw<\/code> exceptions without being documented as such\n(<code>-[AVAssetWriterInputHelper markAsFinished]<\/code>).<\/p><p>[&#8230;]<\/p><p>You can certainly tell that some of Xcode&rsquo;s features become slower and slower as your project grows,\nand we are <a href=\"https:\/\/twitter.com\/andy_matuschak\/status\/550441287040512000\" title=\"Andy Matuschak on Swift Iteration Speeds\">not the only ones noticing<\/a>. Iteration time (the time it takes after\nmaking a code change, hitting CMD+R, and having your app run in the simulator) is also worse than in\nObjective-C. A quick test shows that adding a single line brings the wait up to 14 seconds, and this\nvaries greatly depending on what you do. Making a similar change in our\n<a href=\"https:\/\/itunes.apple.com\/app\/duolingo-aprende-idiomas-gratis\/id570060128?mt=8\" title=\"Duolingo on the App Store\">Objective-C based app<\/a> takes about two to three seconds.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Chris Surowiec (via iOS Dev Weekly): Our biggest gripe &#8211; and source of frustration &#8211; with Swift is probably not the language itself, but the tooling around it. Xcode (Apple&rsquo;s Objective-C and Swift IDE) does not yet feel solid with Swift code. During development of our app, the IDE would often slow down noticeably or [&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":[69,1107,79,31,26,46,54,71,901,226],"class_list":["post-10510","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-duolingo","tag-exceptions","tag-ios","tag-iosapp","tag-languagedesign","tag-objective-c","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/10510","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=10510"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/10510\/revisions"}],"predecessor-version":[{"id":10511,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/10510\/revisions\/10511"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=10510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=10510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=10510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}