{"id":24859,"date":"2019-04-03T14:30:40","date_gmt":"2019-04-03T18:30:40","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=24859"},"modified":"2019-04-03T15:47:51","modified_gmt":"2019-04-03T19:47:51","slug":"accessors-have-message-obsession","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/04\/03\/accessors-have-message-obsession\/","title":{"rendered":"Accessors Have Message Obsession"},"content":{"rendered":"<p><a href=\"https:\/\/blog.metaobject.com\/2019\/04\/accessors-have-message-obsession.html\">Marcel Weiher<\/a> (<a href=\"https:\/\/twitter.com\/mpweiher\/status\/1113388264159883266\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/blog.metaobject.com\/2019\/04\/accessors-have-message-obsession.html\">\n<p>Every single attribute of every single class gets its own accessor or accessor pair, again with the action\n(get\/set) mushed together with the name of the attribute to work on.  The solution is the same as for\nthe directions in Nat&rsquo;s example: there are\nonly two actual messages, with reified <a href=\"https:\/\/www.hpi.uni-potsdam.de\/hirschfeld\/publications\/media\/WeiherHirschfeld_2013_PolymorphicIdentifiersUniformResourceAccessInObjectiveSmalltalk_AcmDL.pdf\">identifiers<\/a>.<\/p>\n<p>These, of course, correspond to the GET and PUT HTTP verbs. Properties, now available in a number of mainstream languages, are supposed to address this issue, but they only really address to 2:1 problem (getter and setter for an attribute). The much bigger N:2 problem (method pair for every attribute) remains unaddressed, and particularly you also cannot pass around, store or perform calculations on the identifier.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Marcel Weiher (tweet): Every single attribute of every single class gets its own accessor or accessor pair, again with the action (get\/set) mushed together with the name of the attribute to work on. The solution is the same as for the directions in Nat&rsquo;s example: there are only two actual messages, with reified identifiers. These, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-04-03T18:30:42Z","apple_news_api_id":"b1c91a9a-99e6-4c80-a87c-35cc8aecb234","apple_news_api_modified_at":"2019-04-03T18:30:55Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AsckampnmTICofDXMiuyyNA","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":[27,46,71,515],"class_list":["post-24859","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-craft","tag-languagedesign","tag-programming","tag-smalltalk"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24859","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=24859"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24859\/revisions"}],"predecessor-version":[{"id":24866,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24859\/revisions\/24866"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=24859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=24859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=24859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}