{"id":13061,"date":"2015-12-10T13:37:31","date_gmt":"2015-12-10T18:37:31","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=13061"},"modified":"2015-12-10T13:38:07","modified_gmt":"2015-12-10T18:38:07","slug":"improving-readabilty-with-swift-extensions","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/12\/10\/improving-readabilty-with-swift-extensions\/","title":{"rendered":"Improving Readabilty With Swift Extensions"},"content":{"rendered":"<p><a href=\"http:\/\/bandes-stor.ch\/blog\/2015\/11\/28\/help-yourself-to-some-swift\/\">Jacob Bandes-Storch<\/a>:<\/p>\n<blockquote cite=\"http:\/\/bandes-stor.ch\/blog\/2015\/11\/28\/help-yourself-to-some-swift\/\">\n<p>One perk of being a programmer is that, if your tools don&rsquo;t do what you want, you can improve them yourself. Swift makes this particularly easy, providing several features which enable you to extend and customize the language in a way that feels natural.<\/p>\n<\/blockquote>\n<p>Unlike Objective-C categories, Swift extensions let you extend C types like <code>CGContext<\/code> and <code>dispatch_queue_t<\/code>.<\/p>\n<blockquote cite=\"http:\/\/bandes-stor.ch\/blog\/2015\/11\/28\/help-yourself-to-some-swift\/\"><p>If your project has both Objective-C and Swift, you may encounter an awkward moment when an Obj-C API just doesn&rsquo;t feel <em>Swifty<\/em> enough. <code>NS_REFINED_FOR_SWIFT<\/code> to the rescue.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Jacob Bandes-Storch: One perk of being a programmer is that, if your tools don&rsquo;t do what you want, you can improve them yourself. Swift makes this particularly easy, providing several features which enable you to extend and customize the language in a way that feels natural. Unlike Objective-C categories, Swift extensions let you extend C [&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,27,880,31,30,71,178,901],"class_list":["post-13061","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-craft","tag-grand-central-dispatch-gcd","tag-ios","tag-mac","tag-programming","tag-quartz","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13061","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=13061"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13061\/revisions"}],"predecessor-version":[{"id":13063,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13061\/revisions\/13063"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=13061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=13061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=13061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}