{"id":30385,"date":"2020-10-08T16:16:07","date_gmt":"2020-10-08T20:16:07","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=30385"},"modified":"2020-10-08T16:16:07","modified_gmt":"2020-10-08T20:16:07","slug":"swift-algorithms-package","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2020\/10\/08\/swift-algorithms-package\/","title":{"rendered":"Swift &ldquo;Algorithms&rdquo; Package"},"content":{"rendered":"<p><a href=\"https:\/\/swift.org\/blog\/swift-algorithms\/\">Nate Cook<\/a>:<\/p>\n<blockquote cite=\"https:\/\/swift.org\/blog\/swift-algorithms\/\"><p>I&rsquo;m excited to announce <a href=\"https:\/\/github.com\/apple\/swift-algorithms\">Swift Algorithms<\/a>, a new open-source package of sequence and collection algorithms, along with their related types.<\/p><p>Algorithms are powerful tools for thought because they encapsulate difficult-to-read and error-prone raw loops. The <code>Algorithms<\/code> package includes a host of powerful, generic algorithms frequently found in other popular programming languages. We hope this new package will help people <a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2018\/223\/\">embrace algorithms<\/a>, improving the correctness and performance of their code.<\/p><p>[&#8230;]<\/p><p>It&rsquo;s our ambition for the standard library to include a rich, pragmatic set of generic algorithms. We think the <code>Algorithms<\/code> package can help realize this goal by serving as a low-friction venue to build out new families of related algorithms&mdash;giving us an opportunity to iteratively explore the problem space and learn how different algorithms connect and interact&mdash;before graduating them into the standard library.<\/p><\/blockquote>\n<p>I love how each one is <a href=\"https:\/\/github.com\/apple\/swift-algorithms\/blob\/main\/Guides\/Partition.md\">documented<\/a> and includes links to the source and tests.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/10\/02\/introducing-swift-atomics\/\">Introducing Swift Atomics<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Nate Cook: I&rsquo;m excited to announce Swift Algorithms, a new open-source package of sequence and collection algorithms, along with their related types.Algorithms are powerful tools for thought because they encapsulate difficult-to-read and error-prone raw loops. The Algorithms package includes a host of powerful, generic algorithms frequently found in other popular programming languages. We hope this [&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":"2020-10-08T20:16:11Z","apple_news_api_id":"92cccf36-36c8-4ace-bd21-f6ecd1e84c69","apple_news_api_modified_at":"2020-10-08T20:16:11Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AkszPNjbISs69Ifbs0ehMaQ","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":[289,31,1837,30,1666,74,71,901],"class_list":["post-30385","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-algorithm","tag-ios","tag-ios-14","tag-mac","tag-macos-10-15","tag-opensource","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/30385","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=30385"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/30385\/revisions"}],"predecessor-version":[{"id":30386,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/30385\/revisions\/30386"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=30385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=30385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=30385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}