{"id":13212,"date":"2016-01-07T10:38:53","date_gmt":"2016-01-07T15:38:53","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=13212"},"modified":"2016-01-07T11:06:13","modified_gmt":"2016-01-07T16:06:13","slug":"swift-bracing","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/01\/07\/swift-bracing\/","title":{"rendered":"Swift Bracing"},"content":{"rendered":"<p><a href=\"http:\/\/ericasadun.com\/2015\/12\/28\/swift-bracing\/\">Erica Sadun<\/a>:<\/p>\n<blockquote cite=\"http:\/\/ericasadun.com\/2015\/12\/28\/swift-bracing\/\">\n<p>It&rsquo;s a shame then that the language has adopted 1TBS over Allman when the latter exposes scope so beautifully and the former can be quite hard to follow, especially with respect to complex declarations that include external and internal&nbsp;labels, default values, and other complicating features<\/p>\n<\/blockquote>\n<p>Around the time Swift was introduced, I switched to 1TBS after about 20 years of Allman. I like the compactness.<\/p>\n<p>The indentation of <code>switch<\/code> statements is pretty bad, though. At first I thought it was a bug in Xcode&rsquo;s auto-indentation, but the Swift documentation uses the same style.<\/p>","protected":false},"excerpt":{"rendered":"<p>Erica Sadun: It&rsquo;s a shame then that the language has adopted 1TBS over Allman when the latter exposes scope so beautifully and the former can be quite hard to follow, especially with respect to complex declarations that include external and internal&nbsp;labels, default values, and other complicating features Around the time Swift was introduced, I switched [&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-13212","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\/13212","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=13212"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13212\/revisions"}],"predecessor-version":[{"id":13224,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13212\/revisions\/13224"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=13212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=13212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=13212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}