{"id":11832,"date":"2015-07-27T23:42:09","date_gmt":"2015-07-28T03:42:09","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=11832"},"modified":"2015-07-27T23:57:55","modified_gmt":"2015-07-28T03:57:55","slug":"linked-lists-enums-value-types-and-identity","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/07\/27\/linked-lists-enums-value-types-and-identity\/","title":{"rendered":"Linked Lists, Enums, Value Types and Identity"},"content":{"rendered":"<p><a href=\"http:\/\/airspeedvelocity.net\/2015\/07\/26\/linked-lists-enums-value-types-and-identity\/\">Airspeed Velocity<\/a> (<a href=\"https:\/\/twitter.com\/AirspeedSwift\/status\/625341134290731008\">tweet<\/a>):<\/p>\n<blockquote cite=\"http:\/\/airspeedvelocity.net\/2015\/07\/26\/linked-lists-enums-value-types-and-identity\/\">\n<p>So, with our nodes being references, we essentially got a free globally-unique identifier for each one, which we could then use to implement node equality. But now that we have switched away from box, we can&rsquo;t use <code>===<\/code> any more. So what can we do?<\/p>\n<p>[&#8230;]<\/p>\n<p>Finally, a third option: tag our list elements with a number, and use that to compare them.<\/p>\n<\/blockquote>\n<p>I hope there&rsquo;s a better way.<\/p>","protected":false},"excerpt":{"rendered":"<p>Airspeed Velocity (tweet): So, with our nodes being references, we essentially got a free globally-unique identifier for each one, which we could then use to implement node equality. But now that we have switched away from box, we can&rsquo;t use === any more. So what can we do? [&#8230;] Finally, a third option: tag our [&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":[31,46,30,71,901],"class_list":["post-11832","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-ios","tag-languagedesign","tag-mac","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/11832","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=11832"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/11832\/revisions"}],"predecessor-version":[{"id":11833,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/11832\/revisions\/11833"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=11832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=11832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=11832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}