{"id":42850,"date":"2024-04-12T14:53:55","date_gmt":"2024-04-12T18:53:55","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=42850"},"modified":"2025-09-26T09:20:02","modified_gmt":"2025-09-26T13:20:02","slug":"swift-for-c-practitioners","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/04\/12\/swift-for-c-practitioners\/","title":{"rendered":"Swift for C++ Practitioners"},"content":{"rendered":"<p><a href=\"https:\/\/sfba.social\/@dgregor79\/112253040167641326\">Doug Gregor<\/a>:<\/p>\n<blockquote cite=\"https:\/\/sfba.social\/@dgregor79\/112253040167641326\"><p>I&rsquo;ve started a blog series aimed at C++ programmers who are interested in learning #SwiftLang. It teaches the breadth of the Swift language, but anchored in the features and idioms of C++. So if you know your Rule Of Fives and your SFINAEs and think you might be interested in Swift, I&rsquo;d love to hear what you think.<\/p><\/blockquote>\n\n<ul>\n<li><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-value-types\">Part 1: Intro &amp; Value Types<\/a><\/li>\n<li><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-reference-types\">Part 2: Reference Types &amp; Optionals<\/a><\/li>\n<li><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-extensions\">Part 3: Extensions and Access Control<\/a><\/li>\n<li><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-generics\">Part 4: Generics<\/a><\/li>\n<li><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-type-erasure\">Part 5: Type erasure &amp; metatypes<\/a><\/li>\n<\/ul>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/04\/10\/run-time-polymorphism-in-swift\/\">Run-time Polymorphism in Swift<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/06\/02\/a-vision-for-using-c-from-swift\/\">A Vision for Using C++ From Swift<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2015\/11\/06\/how-swift-implements-generics\/\">How Swift Implements Generics<\/a><\/li>\n<\/ul>\n\n<p id=\"swift-for-c-practitioners-update-2024-04-24\">Update (2024-04-24): <a href=\"https:\/\/sfba.social\/@dgregor79\/112275959846368558\">Doug Gregor<\/a>:<\/p>\n<blockquote cite=\"https:\/\/sfba.social\/@dgregor79\/112275959846368558\">\n<p><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-error-handling\/\">Part 6<\/a> covers error handling.<\/p>\n<\/blockquote>\n\n<p id=\"swift-for-c-practitioners-update-2024-05-07\">Update (2024-05-07): <a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-closures\/\">Part 7<\/a> covers closures.<\/p>\n\n<p id=\"swift-for-c-practitioners-update-2024-05-21\">Update (2024-05-21): <a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-global-variables\/\">Part 8<\/a> covers global variables.<\/p>\n\n<p id=\"swift-for-c-practitioners-update-2024-06-25\">Update (2024-06-25): <a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-literals\/\">Part 9<\/a> covers extensible literals.<\/p>\n\n<p id=\"swift-for-c-practitioners-update-2024-07-02\">Update (2024-07-02): <a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-operators\/\">Part 10<\/a> covers operator overloading.<\/p>\n\n<p id=\"swift-for-c-practitioners-update-2025-01-08\">Update (2025-01-08): <a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-dsls\/\">Part 11<\/a> covers domain-specific embedded languages with result builders.<\/p>\n<p><a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-move\/\">Part 12<\/a> covers move semantics (<a href=\"https:\/\/news.ycombinator.com\/item?id=42620054\">Hacker News<\/a>).<\/p>\n\n<p id=\"swift-for-c-practitioners-update-2025-09-26\">Update (<a href=\"#swift-for-c-practitioners-update-2025-09-26\">2025-09-26<\/a>): <a href=\"https:\/\/www.douggregor.net\/posts\/swift-for-cxx-practitioners-flexible-array-members\/\">Part 13<\/a> covers flexible array members.<\/p>","protected":false},"excerpt":{"rendered":"<p>Doug Gregor: I&rsquo;ve started a blog series aimed at C++ programmers who are interested in learning #SwiftLang. It teaches the breadth of the Swift language, but anchored in the features and idioms of C++. So if you know your Rule Of Fives and your SFINAEs and think you might be interested in Swift, I&rsquo;d love [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-04-12T18:53:58Z","apple_news_api_id":"5e0b37ba-9c0a-4025-9a0c-a29be819ae07","apple_news_api_modified_at":"2025-09-26T13:20:04Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAABw==","apple_news_api_share_url":"https:\/\/apple.news\/AXgs3upwKQCWaDKKb6BmuBw","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":[326,46,71,901],"class_list":["post-42850","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-c-plus-plus","tag-languagedesign","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42850","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=42850"}],"version-history":[{"count":9,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42850\/revisions"}],"predecessor-version":[{"id":49381,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42850\/revisions\/49381"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=42850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=42850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=42850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}