{"id":18694,"date":"2017-08-22T14:00:26","date_gmt":"2017-08-22T18:00:26","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=18694"},"modified":"2017-08-22T14:00:26","modified_gmt":"2017-08-22T18:00:26","slug":"swift-4-synthesizing-equatable-and-hashable-conformance","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/08\/22\/swift-4-synthesizing-equatable-and-hashable-conformance\/","title":{"rendered":"Swift 4: Synthesizing Equatable and Hashable Conformance"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0185-synthesize-equatable-hashable.md\">SE-0185<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/apple\/swift-evolution\/blob\/master\/proposals\/0185-synthesize-equatable-hashable.md\">\n<p>Developers have to write large amounts of boilerplate code to support\nequatability and hashability of complex types. This proposal offers a way for\nthe compiler to automatically synthesize conformance to <code>Equatable<\/code> and\n<code>Hashable<\/code> to reduce this boilerplate, in a subset of scenarios where generating\nthe correct implementation is known to be possible.<\/p>\n<\/blockquote>\n<p>Terrific.<\/p>","protected":false},"excerpt":{"rendered":"<p>SE-0185: Developers have to write large amounts of boilerplate code to support equatability and hashability of complex types. This proposal offers a way for the compiler to automatically synthesize conformance to Equatable and Hashable to reduce this boilerplate, in a subset of scenarios where generating the correct implementation is known to be possible. Terrific.<\/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-18694","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\/18694","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=18694"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18694\/revisions"}],"predecessor-version":[{"id":18695,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18694\/revisions\/18695"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=18694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=18694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=18694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}