{"id":23325,"date":"2018-11-07T17:07:34","date_gmt":"2018-11-07T22:07:34","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=23325"},"modified":"2019-01-18T10:30:44","modified_gmt":"2019-01-18T15:30:44","slug":"server-side-swift-making-canopy","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/11\/07\/server-side-swift-making-canopy\/","title":{"rendered":"Server-side Swift: Making Canopy"},"content":{"rendered":"<p><a href=\"https:\/\/medium.com\/@mxcl\/server-side-swift-making-canopy-2ed586b7f5a9\">Max Howell<\/a>:<\/p>\n<blockquote cite=\"https:\/\/medium.com\/@mxcl\/server-side-swift-making-canopy-2ed586b7f5a9\"><p>Swift is not the best language at everything, but it is the best set of trade-offs that make it the best language overall for anything (it supports) right now. Since it was announced the clear and careful design decisions of Swift-Core have impressed me enough to commit to it entirely. I have programmed in many, many languages and often find that the language and its standard library are inconsistently good, Team-Swift give a damn about their language and its standard library at a level beyond anything else out there.<\/p><p>[&#8230;]<\/p><p>Intrinsic type-safety cross-process with barely any work from me was <em>super comfy<\/em> and made the 1,000 miles between me and my server seem no different to passing data between view-controllers.<\/p><p>However the lack of dynamism means even adding a single parameter to these structs means versioning my endpoints or making new parameters <code>Optional<\/code>. It&rsquo;s not all roses, but frankly, versioning has worked well and means my code for interpreting incoming data is not a logic bomb of if-statements, it is carefully, separately encapsulated and tested, type-safe endpoints.<\/p><\/blockquote>\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2017\/10\/06\/when-jsondecoder-meets-the-real-world\/\">When JSONDecoder Meets the Real World<\/a>, <a href=\"https:\/\/mjtsai.com\/blog\/2017\/07\/14\/swift-codable\/\">Swift.Codable<\/a>, <a href=\"https:\/\/mjtsai.com\/blog\/2017\/06\/30\/swift-4-json-with-encoder-and-encodable\/\">Swift 4: JSON With Encoder and Encodable<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Max Howell: Swift is not the best language at everything, but it is the best set of trade-offs that make it the best language overall for anything (it supports) right now. Since it was announced the clear and careful design decisions of Swift-Core have impressed me enough to commit to it entirely. I have programmed [&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":"2018-11-07T22:07:36Z","apple_news_api_id":"37faba67-52d8-4522-8536-7ea38019da1b","apple_news_api_modified_at":"2019-01-18T15:30:48Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AN_q6Z1LYRSKFNn6jgBnaGw","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":[507,448,71,1774,901,96],"class_list":["post-23325","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-json","tag-linux","tag-programming","tag-swift-codable","tag-swift-programming-language","tag-web"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23325","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=23325"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23325\/revisions"}],"predecessor-version":[{"id":23326,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/23325\/revisions\/23326"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=23325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=23325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=23325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}