{"id":34394,"date":"2021-12-10T15:28:08","date_gmt":"2021-12-10T20:28:08","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34394"},"modified":"2021-12-16T15:55:44","modified_gmt":"2021-12-16T20:55:44","slug":"abrahams-on-the-design-of-swift","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/12\/10\/abrahams-on-the-design-of-swift\/","title":{"rendered":"Abrahams on the Design of Swift"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/DaveAbrahams\/status\/1468286987480158209\">Dave Abrahams<\/a>, former lead of the Swift standard library and SwiftUI contributor:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/DaveAbrahams\/status\/1468286987480158209\"><p>My Rebase 2021 talk, &ldquo;a retrospective on the design of Swift,&rdquo; is up at [<a href=\"https:\/\/www.youtube.com\/watch?v=6JYAXADQmNQ\">YouTube<\/a>]<\/p><\/blockquote>\n<p>This is a very interesting talk containing some very strange example Objective-C code. He states several times that he doesn&rsquo;t use classes, only value types. This may be a good <em>goal<\/em>, but for app development it seems completely unrealistic for a variety of practical and performance reasons. One is left wondering how well he understood the needs of the developers who would be using the Swift language and library, though he says others on the Swift team had experience writing apps. Overall, I think the standard library is deservedly seen as a success story. I remain deeply skeptical of SwiftUI.<\/p>\n\n<p>I do wholeheartedly agree with Abrahams that the design of the current Swift documentation does many programmers a disservice by omitting important details about conditional conformances and where methods are defined. It seems to follow the <a href=\"https:\/\/mjtsai.com\/blog\/2021\/12\/10\/inside-apples-design-team\/\">Alan Dye<\/a> school of design. Making things <em>look<\/em> simple by hiding things doesn&rsquo;t actually <em>make<\/em> them simple.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/01\/16\/swift-community-podcast\/\">Swift Community Podcast<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2017\/01\/23\/chris-lattner-atp-interview\/\">Chris Lattner ATP Interview<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2015\/09\/01\/swift-protocols\/\">Swift Protocols<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2014\/08\/18\/its-a-coup\/\">&ldquo;It&rsquo;s a Coup&rdquo;<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2014\/06\/27\/the-case-for-message-passing-in-swift\/\">The Case for Message Passing in Swift<\/a><\/li>\n<\/ul>\n\n<p id=\"abrahams-on-the-design-of-swift-update-2021-12-13\">Update (2021-12-13): <a href=\"https:\/\/twitter.com\/gparker\/status\/1469842519349350400\">Greg Parker<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/gparker\/status\/1469842519349350400\"><p>&ldquo;Objective-C without the C&rdquo; was a good keynote line but it&rsquo;s a bad description of Swift.<\/p><p>We designed a language that was closer to Objective-C without the C. It wasn&rsquo;t good enough to make up for the costs. Adoption of a new language had to be &ldquo;go big or go home&rdquo;.<\/p><p>[&#8230;]<\/p><p>The introduction of Objective-C garbage collection and ARC had improved the raw C-ness of the API, but there was still a long way to go. (There was also some false optimism from the old Java Bridge: the OS was just too big now for its techniques to scale easily.)<\/p><p>The GC work had also taught us that getting cooperation from unenthusiastic framework owners was difficult. Swift&rsquo;s appeal as a language with fundamentally new capabilities helped get engineers and managers on board with the necessary grunt work.<\/p><p>Performance was also likely to become a problem. NSArrays and na&iuml;ve ARC weren&rsquo;t going to be good enough. Swift paid the engineer-hours to get new collection and refcounting implementations and new compiler support to optimize and bridge them.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/helje5\/status\/1470095933790695433\">Helge He&szlig;<\/a> notes that NeXT had already done a basic &ldquo;Objective-C without the C&rdquo; called <a href=\"https:\/\/developer.apple.com\/library\/archive\/documentation\/LegacyTechnologies\/WebObjects\/WebObjects_3.1\/DevGuide\/WebScript\/WebScript.mif.book.html\">WebScript<\/a> (<a href=\"https:\/\/developer.apple.com\/library\/archive\/documentation\/LegacyTechnologies\/WebObjects\/WebObjects_3.1\/PDF\/DEVGUIDE\/SCRIPT.PDF\">PDF<\/a>).<\/p>\n\n<p id=\"abrahams-on-the-design-of-swift-update-2021-12-16\">Update (2021-12-16): See also: <a href=\"https:\/\/news.ycombinator.com\/item?id=29558409\">Hacker News<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Dave Abrahams, former lead of the Swift standard library and SwiftUI contributor: My Rebase 2021 talk, &ldquo;a retrospective on the design of Swift,&rdquo; is up at [YouTube] This is a very interesting talk containing some very strange example Objective-C code. He states several times that he doesn&rsquo;t use classes, only value types. This may be [&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":"2021-12-10T20:28:12Z","apple_news_api_id":"457dd507-089c-44fe-9536-8f5888debdb7","apple_news_api_modified_at":"2021-12-16T20:55:47Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAg==","apple_news_api_share_url":"https:\/\/apple.news\/ARX3VBwicRP6VNo9YiN69tw","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,164,295,31,46,30,54,71,901,1812],"class_list":["post-34394","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-c-plus-plus","tag-documentation","tag-history","tag-ios","tag-languagedesign","tag-mac","tag-objective-c","tag-programming","tag-swift-programming-language","tag-swiftui"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34394","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=34394"}],"version-history":[{"count":4,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34394\/revisions"}],"predecessor-version":[{"id":34455,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34394\/revisions\/34455"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}