{"id":12666,"date":"2015-10-26T10:41:11","date_gmt":"2015-10-26T14:41:11","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12666"},"modified":"2015-10-26T10:41:11","modified_gmt":"2015-10-26T14:41:11","slug":"swifts-noescape-attribute","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/10\/26\/swifts-noescape-attribute\/","title":{"rendered":"Swift&rsquo;s @noescape Attribute"},"content":{"rendered":"<p><a href=\"http:\/\/nshint.io\/blog\/2015\/10\/23\/noescape-attribute\/\">Mateusz Matoszko<\/a>:<\/p>\n<blockquote cite=\"http:\/\/nshint.io\/blog\/2015\/10\/23\/noescape-attribute\/\">\n<p>While digging into <a href=\"https:\/\/developer.apple.com\/library\/ios\/releasenotes\/DeveloperTools\/RN-Xcode\/Chapters\/xc6_release_notes.html\">release notes<\/a> we can see a bunch of clever words:<\/p>\n<blockquote><p>A new <code>@noescape<\/code> attribute may be used on closure parameters to functions. This indicates that the parameter is only ever called (or passed as an @noescape parameter in a call), which means that it cannot outlive the lifetime of the call. This enables some minor performance optimizations, but more importantly disables the <code>self.<\/code> requirement in closure arguments.<\/p><\/blockquote>\n<p>Lets analyze those smart statements and put it into code so everyone can enjoy it[&#8230;]<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Mateusz Matoszko: While digging into release notes we can see a bunch of clever words: A new @noescape attribute may be used on closure parameters to functions. This indicates that the parameter is only ever called (or passed as an @noescape parameter in a call), which means that it cannot outlive the lifetime of the [&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":[55,46,571,138,71,901],"class_list":["post-12666","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-arc","tag-languagedesign","tag-memory-management","tag-optimization","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12666","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=12666"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12666\/revisions"}],"predecessor-version":[{"id":12667,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12666\/revisions\/12667"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}