{"id":3031,"date":"2023-06-06T21:10:09","date_gmt":"2023-06-07T01:10:09","guid":{"rendered":"https:\/\/michaelrowe01.com\/?p=3031"},"modified":"2023-06-08T09:06:38","modified_gmt":"2023-06-08T13:06:38","slug":"whats-new-in-swift","status":"publish","type":"post","link":"https:\/\/michaelrowe01.com\/index.php\/blog\/whats-new-in-swift\/","title":{"rendered":"What\u2019s new in Swift"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"369\" data-attachment-id=\"3074\" data-permalink=\"https:\/\/michaelrowe01.com\/index.php\/blog\/whats-new-in-swift\/attachment\/%ef%a3%bfwwdc23-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?fit=1896%2C1060&amp;ssl=1\" data-orig-size=\"1896,1060\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\uf8ffWWDC23-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?fit=660%2C369&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?resize=660%2C369&#038;ssl=1\" alt=\"\" class=\"wp-image-3074\" srcset=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?resize=1024%2C572&amp;ssl=1 1024w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?resize=300%2C168&amp;ssl=1 300w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?resize=768%2C429&amp;ssl=1 768w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?resize=1536%2C859&amp;ssl=1 1536w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?w=1896&amp;ssl=1 1896w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-1.png?w=1320&amp;ssl=1 1320w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<p>Swift Project updates<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Language is evolving &#8211; check out <a href=\"http:\/\/swift.org\/swift-evolution\">swift.org\/swift-evolution<\/a>&nbsp;<\/li>\n\n\n\n<li>Creating of ecosystem group<\/li>\n<\/ul>\n\n\n\n<p>Expressive Code<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If-else\/switch can now be used inline &#8211; this simplifies initialization and other conditions<\/li>\n\n\n\n<li>Improved error messages and more directly aligned to where the problem is.&nbsp; (This will come in handy in SwiftUI)<\/li>\n\n\n\n<li>Swift Generics allows for type identification preservation, this has been extended to handle # multiple argument types.&nbsp; So no longer will you be limited to the number of arguments to be passed. Now use &lt;each Result&gt;<\/li>\n\n\n\n<li>Macro System &#8211;\n<ul class=\"wp-block-list\">\n<li>Macros are APIs so you can import module that defines them<\/li>\n\n\n\n<li>@Observable macros is key to turn a class into fully observable in your code. (Expand on Swift Macros session)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Swift everywhere<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Low ceremony code to make it easier to scale<\/li>\n\n\n\n<li>Future of Foundation &#8211; starting a rewrite of Foundation for Apple and non-Apple platforms.&nbsp; This is moving the implementation of Swift to Swift.\n<ul class=\"wp-block-list\">\n<li>Drives major performance updates across calendar (20%), date formatting (150%), and JSON coding (200-500%)<\/li>\n\n\n\n<li>New opt-in capabilities which focus on code ownership. Check it out on the swift forums<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>You can now interoperate between C++ and Swift now. There is a Swift Forum that is being driven by a WorkGroup focused on this.<\/li>\n\n\n\n<li>CMake now support Swift and can e used to mix and match C++ and Swift make files, there is a sample Repo to help you get started<\/li>\n\n\n\n<li>Actors and Concurrency\n<ul class=\"wp-block-list\">\n<li>This section explained synchronization, how the actors and tasks behave<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Case Study<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.foundationdb.org\">https:\/\/www.foundationdb.org<\/a> &#8211; Key value pair Open Source project. They have been migrating from C++ to Swift.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Swift Project updates Expressive Code Swift everywhere Case Study<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"hide_page_title":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2,3],"tags":[107,379,680],"class_list":["post-3031","post","type-post","status-publish","format-standard","hentry","category-blog","category-personal-softwareandit","tag-day-2","tag-swift","tag-wwdc23"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2aMa8-MT","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/comments?post=3031"}],"version-history":[{"count":2,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3031\/revisions"}],"predecessor-version":[{"id":3075,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3031\/revisions\/3075"}],"wp:attachment":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/media?parent=3031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/categories?post=3031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/tags?post=3031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}