{"id":242,"date":"2021-04-29T13:06:00","date_gmt":"2021-04-29T12:06:00","guid":{"rendered":"https:\/\/www.derniercriweb.solutions\/bury-blog\/?p=242"},"modified":"2026-04-07T10:17:04","modified_gmt":"2026-04-07T09:17:04","slug":"swift-programming","status":"publish","type":"post","link":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/2021\/04\/29\/swift-programming\/","title":{"rendered":"Swift"},"content":{"rendered":"\n<p><strong>Swift<\/strong>&nbsp;is a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/General-purpose_programming_language\">general-purpose<\/a>,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Multi-paradigm_programming_language\">multi-paradigm<\/a>,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Compiled_language\">compiled<\/a>&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Programming_language\">programming language<\/a>&nbsp;developed by&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Apple_Inc.\">Apple Inc.<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Open-source-software_movement\">the open-source community<\/a>, first released in 2014. Swift was developed as a replacement for Apple&#8217;s earlier programming language&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Objective-C\">Objective-C<\/a>, as Objective-C had been largely unchanged since the early 1980s and lacked modern language features. Swift works with Apple&#8217;s&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Cocoa_(API)\">Cocoa<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Cocoa_Touch\">Cocoa Touch<\/a>&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Software_framework\">frameworks<\/a>, and a key aspect of Swift&#8217;s design was the ability to interoperate with the huge body of existing Objective-C code developed for Apple products over the previous decades. It is built with the open source&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/LLVM\">LLVM<\/a>&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Compiler\">compiler<\/a>&nbsp;framework and has been included in&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Xcode\">Xcode<\/a>&nbsp;since version 6, released in 2014. On Apple platforms,<sup><a href=\"https:\/\/en.wikipedia.org\/wiki\/Swift_(programming_language)#cite_note-11\">[<\/a><\/sup>&nbsp;it uses the Objective-C&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Runtime_library\">runtime library<\/a>&nbsp;which allows&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/C_(programming_language)\">C<\/a>,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Objective-C\">Objective-C<\/a>,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/C%2B%2B\">C++<\/a>&nbsp;and Swift code to run within one program.<\/p>\n\n\n\n<p>Apple intended Swift to support many core concepts associated with&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Objective-C\">Objective-C<\/a>, notably&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Dynamic_dispatch\">dynamic dispatch<\/a>, widespread&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Late_binding\">late binding<\/a>,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Extensible_programming\">extensible programming<\/a>&nbsp;and similar features, but in a &#8220;safer&#8221; way, making it easier to catch&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Software_bugs\">software bugs<\/a>; Swift has features addressing some common&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Programming_error\">programming errors<\/a>&nbsp;like&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Null_pointer\">null pointer<\/a>&nbsp;dereferencing and provides&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Syntactic_sugar\">syntactic sugar<\/a>&nbsp;to help avoid the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pyramid_of_doom_(programming)\">pyramid of doom<\/a>. Swift supports the concept of&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Protocol_(object-oriented_programming)\">protocol<\/a>&nbsp;extensibility, an extensibility system that can be applied to types,&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Record_(computer_science)\">structs<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Class_(computer_programming)\">classes<\/a>, which Apple promotes as a real change in programming paradigms they term &#8220;protocol-oriented programming&#8221;(similar to&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Trait_(computer_programming)\">traits<\/a>).<\/p>\n\n\n\n<p>Swift was introduced at Apple&#8217;s&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Apple_Worldwide_Developers_Conference#2010s\">2014 Worldwide Developers Conference<\/a>&nbsp;(WWDC).<sup><a href=\"https:\/\/en.wikipedia.org\/wiki\/Swift_(programming_language)#cite_note-tnw_swift_info_1-15\">[<\/a><\/sup>It underwent an upgrade to version 1.2 during 2014 and a major upgrade to Swift 2 at WWDC 2015. Initially a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Proprietary_programming_language\">proprietary language<\/a>, version 2.2 was made&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Open-source_software\">open-source software<\/a>&nbsp;under the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Apache_License\">Apache License<\/a>&nbsp;2.0 on December 3, 2015, for Apple&#8217;s platforms and&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Linux\">Linux<\/a>.<\/p>\n\n\n\n<p>Through version 3.0 the syntax of Swift went through significant evolution, with the core team making source stability a focus in later versions. In the first quarter of 2018 Swift surpassed&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Objective-C\">Objective-C<\/a>&nbsp;in measured popularity.<\/p>\n\n\n\n<p>Swift 4.0, released in 2017, introduced several changes to some built-in classes and structures. Code written with previous versions of Swift can be updated using the migration functionality built into Xcode. Swift 5, released in March 2019, introduced a stable binary interface on Apple platforms, allowing the Swift runtime to be incorporated into Apple operating systems. It is source compatible with Swift 4.<sup><a href=\"https:\/\/en.wikipedia.org\/wiki\/Swift_(programming_language)#cite_note-21\">[<\/a><\/sup><\/p>\n\n\n\n<p>Swift 5.1 was officially released in September 2019. Swift 5.1 builds on the previous version of Swift 5 by extending the stable features of the language to compile-time with the introduction of module stability. The introduction of module stability makes it possible to create and share binary frameworks that will work with future releases of Swift.<\/p>\n\n\n\n<p class=\"has-contrast-color has-white-background-color has-text-color has-background\"><a href=\"https:\/\/www.derniercriweb.co..uk\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.derniercriweb.co.uk<\/a><br><a href=\"https:\/\/derniercri.biz\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/derniercri.biz<\/a><br><a href=\"https:\/\/www.abportfolio.co.uk\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.abportfolio.co.uk<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift&nbsp;is a&nbsp;general-purpose,&nbsp;multi-paradigm,&nbsp;compiled&nbsp;programming language&nbsp;developed by&nbsp;Apple Inc.&nbsp;and&nbsp;the open-source community, first released in 2014. Swift was developed as a replacement for Apple&#8217;s earlier programming language&nbsp;Objective-C, as Objective-C had been largely unchanged since the early 1980s and lacked modern language features. Swift works with Apple&#8217;s&nbsp;Cocoa&nbsp;and&nbsp;Cocoa Touch&nbsp;frameworks, and a key aspect of Swift&#8217;s design was the ability to interoperate with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":247,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[21,23,25,20,19],"class_list":["post-242","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computing","tag-bury","tag-greater-manchester","tag-radcliffe","tag-web-design","tag-web-development"],"_links":{"self":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":0,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/media\/247"}],"wp:attachment":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}