Swift (A Brief Overview)

Swift is an open-source (under Apache License 2.0) compiled programming language developed by Apple Inc. 

History and Role

It’s built with the open source LLVM compiler framework.  It’s a multi-paradigm language, meaning that it attempts to provide the programmer with several different options (e.g. imperative, object-oriented, functional) rather than force the programmer into a single method.  Swift was intended for use on all of Apple’s OS’s (iOS, macOS, watchOS, and tvOS) but Swift has also gained popularity on Linux and even as a web framework via server-side Swift solutions such as Vapor.


Swift is an elegant language which is statically, strongly-typed (and supports type inference), supports optionals, and avoids the “pyramid of doom” using a special “guard” construct that all help to avoid many common errors during compilation and enable neater, more readable code.  Swift also supports “extensions” which enable functionality to be added to a class without the need to subclass (or even have access to the original source code).  Swift’s support of “protocols” enable a class to declare its implementation of particular set of methods.  Because protocols can be used as types, methods are able to accept heterogeneous objects as arguments (even those that aren’t available when the methods themselves were compiled) as long as they implement the given protocol.


Finally, Swift provides the ability to be easily and cleanly debugged in a development environment using a read-eval-print loop which endows it with interactivity more common to scripting.  Xcode (Apple’s integrated development environment) provides a “playground” which further adds to this capability.





Leave a Reply(Markdown is On)