{"id":9497,"date":"2014-09-08T12:34:38","date_gmt":"2014-09-08T16:34:38","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=9497"},"modified":"2016-02-12T14:31:53","modified_gmt":"2016-02-12T19:31:53","slug":"rawoptionsettype","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/09\/08\/rawoptionsettype\/","title":{"rendered":"Raw\u200bOption\u200bSet\u200bType"},"content":{"rendered":"<p><a href=\"http:\/\/nshipster.com\/rawoptionsettype\/\">Mattt Thompson<\/a>:<\/p>\r\n<blockquote cite=\"http:\/\/nshipster.com\/rawoptionsettype\/\"><p>When interacting with frameworks like Foundation in Swift, all of those <code>NS_ENUM<\/code> declarations are automatically converted into an <code>enum<\/code>&mdash;often improving on the original Objective-C declaration by eliminating naming redundancies [&#8230;] Unfortunately, for <code>NS_OPTIONS<\/code>, the Swift equivalent is arguably worse.<\/p>\r\n<p>[&#8230;]<\/p>\r\n<p>Compared to the syntactically concise <code>enum<\/code> declaration, <code>RawOptionsSetType<\/code> is awkward and cumbersome, requiring over a dozen lines of boilerplate for computed properties.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Mattt Thompson: When interacting with frameworks like Foundation in Swift, all of those NS_ENUM declarations are automatically converted into an enum&mdash;often improving on the original Objective-C declaration by eliminating naming redundancies [&#8230;] Unfortunately, for NS_OPTIONS, the Swift equivalent is arguably worse. [&#8230;] Compared to the syntactically concise enum declaration, RawOptionsSetType is awkward and cumbersome, requiring [&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,54,71,901],"class_list":["post-9497","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-languagedesign","tag-objective-c","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9497","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=9497"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9497\/revisions"}],"predecessor-version":[{"id":13554,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9497\/revisions\/13554"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=9497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=9497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=9497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}