{"id":35093,"date":"2022-02-22T15:24:11","date_gmt":"2022-02-22T20:24:11","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=35093"},"modified":"2022-02-22T15:24:40","modified_gmt":"2022-02-22T20:24:40","slug":"objective-c-message-to-no-one","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/02\/22\/objective-c-message-to-no-one\/","title":{"rendered":"Objective-C Messages to nil"},"content":{"rendered":"<p><a href=\"http:\/\/mutable-states.com\/message-to-no-one.html\">psu<\/a>:<\/p>\n<blockquote cite=\"http:\/\/mutable-states.com\/message-to-no-one.html\">\n<p>In the more modern versions of the runtime, the area that the runtime uses to write the result of the method call is zero&rsquo;d out no matter what the type of the return value will be. In older versions of the runtime you could get into trouble because this &ldquo;return 0&rdquo; behavior only worked if the method returned something that was the size of a pointer, or integer, on the runtime platform. And on PowerPC if you called a method that returned a <code>float<\/code> or <code>double<\/code> you could get all kinds of <a href=\"https:\/\/twitter.com\/grynspan\/status\/1495908459916795907\">undefined suffering<\/a>.<\/p>\n<p>Anyway, I was having a chat with a nerd friend of mine at work, and we both got curious if this behavior dated back to the <em>original<\/em> Objective-C runtime or if it was added at some point. With the entire Internet at our fingertips surely this could not be that hard to figure out.<\/p>\n<p>[&#8230;]<\/p>\n<p>The long post verifies that the original Objective-C runtimes threw an error told to send messages to <code>nil<\/code>, and that this was changed to the current fall-through behavior in a release of some software called &ldquo;ICPack 201&rdquo;. This package was released by a company called Stepstone, which originally developed and owned the language in the 80s.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>psu: In the more modern versions of the runtime, the area that the runtime uses to write the result of the method call is zero&rsquo;d out no matter what the type of the return value will be. In older versions of the runtime you could get into trouble because this &ldquo;return 0&rdquo; behavior only worked [&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":"2022-02-22T20:24:14Z","apple_news_api_id":"c40ac290-9fc1-4cde-ac21-e3defd37b606","apple_news_api_modified_at":"2022-02-22T20:24:43Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AxArCkJ_BTN6sIePe_Te2Bg","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":[295,46,54,71],"class_list":["post-35093","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-history","tag-languagedesign","tag-objective-c","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/35093","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=35093"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/35093\/revisions"}],"predecessor-version":[{"id":35095,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/35093\/revisions\/35095"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=35093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=35093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=35093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}