{"id":37363,"date":"2022-10-17T16:21:59","date_gmt":"2022-10-17T20:21:59","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=37363"},"modified":"2022-10-17T16:21:59","modified_gmt":"2022-10-17T20:21:59","slug":"compiling-swift-generics","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/10\/17\/compiling-swift-generics\/","title":{"rendered":"Compiling Swift Generics"},"content":{"rendered":"<p><a href=\"https:\/\/forums.swift.org\/t\/compiling-swift-generics-part-i\/60898\"> Slava Pestov<\/a> (<a href=\"https:\/\/twitter.com\/slava_pestov\/status\/1582054521194262528\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/forums.swift.org\/t\/compiling-swift-generics-part-i\/60898\"><p>Well, I finally got around to starting a write up about how generics work last year, and I think I its finally in good enough shape that I can release the first part of what is going to be a three part series. So here it is:<\/p><ul><li>PDF: <a href=\"http:\/\/download.swift.org\/docs\/assets\/generics.pdf\">http:\/\/download.swift.org\/docs\/assets\/generics.pdf<\/a><\/li><li>Source code: <a href=\"https:\/\/github.com\/apple\/swift\/tree\/main\/docs\/Generics\">swift\/docs\/Generics at main &middot; apple\/swift &middot; GitHub<\/a><\/li><\/ul>\n<p>[&#8230;]<\/p>\n<p>The first half of Part I begins with a big-picture overview of the key ideas behind Swift generics, and then goes on to talk about foundational material that's important to understanding the Swift compiler in general: the compilation pipeline, module system, request evaluator, types, and declarations. The second half of Part I actually dives into the details of the generics implementation in earnest; starting with the AST for generic declarations, and then going on to talk about generic signatures, substitution maps, conformances, and generic environments.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/02\/28\/swift-type-checking-is-undecidable\/\">Swift Type Checking Is Undecidable<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Slava Pestov (tweet): Well, I finally got around to starting a write up about how generics work last year, and I think I its finally in good enough shape that I can release the first part of what is going to be a three part series. So here it is:PDF: http:\/\/download.swift.org\/docs\/assets\/generics.pdfSource code: swift\/docs\/Generics at main [&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-10-17T20:22:01Z","apple_news_api_id":"5ea25dbb-affe-42aa-81e8-deca9a14b82c","apple_news_api_modified_at":"2022-10-17T20:22:02Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AXqJdu6_-QqqB6N7KmhS4LA","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":[255,263,46,71,901],"class_list":["post-37363","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-compiler","tag-theory","tag-languagedesign","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37363","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=37363"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37363\/revisions"}],"predecessor-version":[{"id":37364,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37363\/revisions\/37364"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=37363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=37363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=37363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}