{"id":9445,"date":"2014-09-02T16:54:24","date_gmt":"2014-09-02T20:54:24","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=9445"},"modified":"2014-09-02T16:54:24","modified_gmt":"2014-09-02T20:54:24","slug":"protocols-and-assumptions","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/09\/02\/protocols-and-assumptions\/","title":{"rendered":"Protocols and Assumptions"},"content":{"rendered":"<p><a href=\"http:\/\/airspeedvelocity.net\/2014\/08\/29\/protocols-and-assumptions\/\">Airspeed Velocity<\/a>:<\/p>\n<blockquote cite=\"http:\/\/airspeedvelocity.net\/2014\/08\/29\/protocols-and-assumptions\/\"><p>So what&rsquo;s the solution &#8211; should <code>RangeReplaceableCollectionType<\/code> mandate the kind of index validity behaviour our <code>remove<\/code> algorithm relies on?  Or are the assumptions invalid and we need a better algorithm?  (of which more in a later article)  The Swift standard library is still evolving rapidly with each beta so it&rsquo;s possibly a little early to tell.  For now, be careful about the assumptions you make &#8211; just because all the current implementations of a particular protocol work a certain way doesn&rsquo;t mean other implementations will.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Airspeed Velocity: So what&rsquo;s the solution &#8211; should RangeReplaceableCollectionType mandate the kind of index validity behaviour our remove algorithm relies on? Or are the assumptions invalid and we need a better algorithm? (of which more in a later article) The Swift standard library is still evolving rapidly with each beta so it&rsquo;s possibly a little [&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":[46,71,901],"class_list":["post-9445","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\/9445","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=9445"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9445\/revisions"}],"predecessor-version":[{"id":9446,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9445\/revisions\/9446"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=9445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=9445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=9445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}