{"id":13576,"date":"2016-02-16T15:32:44","date_gmt":"2016-02-16T20:32:44","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=13576"},"modified":"2016-02-23T11:39:52","modified_gmt":"2016-02-23T16:39:52","slug":"swift-evolution-proposals","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/02\/16\/swift-evolution-proposals\/","title":{"rendered":"Swift Evolution Proposals"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0024-optional-value-setter.md\">SE-0024: Optional Value Setter <code>??=<\/code><\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0024-optional-value-setter.md\">\n<p>In certain cases the <code>??<\/code> operation doesn't help with lengthly variable names, i.e., <code>really.long.lvalue[expression] = really.long.lvalue[expression] ?? \"\"<\/code>. In addition to this other languages such as Ruby contain a pipe operator <code>really.long.lvalue[expression] ||= \"\"<\/code> which works the same way and which is very popular. This lowers the barrier of entry for programmers from that language.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0030-property-behavior-decls.md\">SE-0030: Property Behaviors<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0030-property-behavior-decls.md\"><p>There are property implementation patterns that come up repeatedly. Rather than hardcode a fixed set of patterns into the compiler, we should provide a general &ldquo;property behavior&rdquo; mechanism to allow these patterns to be defined as libraries.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0031-adjusting-inout-declarations.md\">SE-0031: Adjusting <code>inout<\/code> Declarations for Type Decoration<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0031-adjusting-inout-declarations.md\"><p>The <code>inout<\/code> keyword indicates copy-in\/copy-out argument behavior. In its current implementation the keyword prepends argument names. We propose to move the <code>inout<\/code> keyword to the right side of the colon to decorate the type instead of the parameter label.<\/p><\/blockquote>\n\n<p>All of these are currently under review. Property behaviors look very useful.<\/p>\n\n<p>Update (2016-02-17): <a href=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0035-limit-inout-capture.md\">SE-0035: Limiting <code>inout<\/code> capture to <code>@noescape<\/code> contexts<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0035-limit-inout-capture.md\"><p>I propose we make it so that implicitly capturing an <code>inout<\/code> parameter into a escapable\nclosure is an error. We added the explicit <code>@noescape<\/code> annotation in Swift 1.2, and have since\nadopted it throughout the standard library where appropriate, so the compromise has outlived\nits usefulness and become a source of confusion.<\/p><\/blockquote>\n<p>Previously: <a href=\"http:\/\/mjtsai.com\/blog\/2016\/02\/02\/seven-swift-snares\/\">Seven Swift Snares<\/a>.<\/p>\n\n<p>Update (2016-02-23): <a href=\"http:\/\/ericasadun.com\/2016\/02\/23\/three-rejected-swift-proposals\/\">Erica Sadun<\/a>:<\/p>\n<blockquote cite=\"http:\/\/ericasadun.com\/2016\/02\/23\/three-rejected-swift-proposals\/\">\n<p>The Swift team has rejected three Swift proposals.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>SE-0024: Optional Value Setter ??=: In certain cases the ?? operation doesn't help with lengthly variable names, i.e., really.long.lvalue[expression] = really.long.lvalue[expression] ?? \"\". In addition to this other languages such as Ruby contain a pipe operator really.long.lvalue[expression] ||= \"\" which works the same way and which is very popular. This lowers the barrier of entry [&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":[46,71,901],"class_list":["post-13576","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-languagedesign","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13576","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=13576"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13576\/revisions"}],"predecessor-version":[{"id":13666,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13576\/revisions\/13666"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=13576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=13576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=13576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}