All About Swift

Swift is a programming language for iOS devices created by Apple in 2014. It replaced Objective-C, a language that Apple used previously, so Swift is a C-like language but with more modern features. It adopted features from other programming languages to create a tool that can be used across many technologies from iPhones, MacBook, back-end servers and even web development. It's designed to be fast, safe, and expressive. 

As in the name, a programming language is just another way to communicate. What makes it special is how we use it to communicate with computers. It allows us to input our human thoughts and instructions into something the computer can understand then eventually perform. 

Notable Features

To break it down simply, the following features are some of the most notable when it comes to Swift:

Swift is Open-source: This means any developer can improve upon it and not just Apple. It's accessible to the broad community of developers to make Swift more amazing. 

Swift is strongly-typed: Swift makes it easy to know exactly what type of data you're working with because it checks if the variable or function argument is correct. This makes it different from JavaScript that will usually infer what type of data you're using.

It's easier to read and write: The Swift language is clean, simple, and less prone to mistakes.

It has enhanced concurrency: Concurrency refers to the combination of asynchronous and parallel code. Asynchronous code can be paused and resumed later, and parallel code means multiple pieces of code can run simultaneously. Swift has built in support for writing asynchronous and parallel code that is carried out in a memory safe way.

It has protocol extensibility: Swift protocol focuses on protocol extensibility, which provides a default to implementation and makes it easy for types to conform to a protocol. This allows a technique called "protocol-oriented programming". 

Swift offers UI Frameworks: UIKit and SwiftUI are used to build user interface displayed on a screen. UIKit is powerful but is slowly being replaced by SwiftUI which includes more complex layouts that are multidimensional and dynamic. It also achieves the same results with less code, making development faster and easier for other engineers to understand. 

Swift At Work

Apple recently held their Worldwide Developers Conference (WWDC22) which showcases their newest upgrades and creations. They announced that Swift underwent a few major updates to these features and plans to keep expanding on them. 

To get an inside scoop on Swift programming, we talked with one of our Software Engineers at In Time Tec about their experience with the language. "It's a powerful and modern language with syntax that's easy to learn", so much so that it can be written in ways that "make it read almost like English". This makes Apple's ecosystem more impressive, especially with the new upgrades and incorporation of SwiftUI. 

Our engineer is currently working on building a native iOS application for the St. Luke's Hospital network. They explain that when building a mobile app, one must consider both smartphone platforms: Android and iOS. For this project, they're using Swift to build the native iOS application and looking to incorporate SwiftUI. To build the native Android application, they're using Kotlin. To achieve this efficiently, the developers divided up into two teams to focus on each application and provide solutions for both platforms. One tricky part is keeping both the Android and iOS apps looking the same, but it's achievable with proper communication and coordination among the In Time Tec developers. 

Overall, Swift programming language is a way developers write instructions for computers to follow. It's powerful and modern with a syntax that's easy to learn. For some of the Software Engineers at In Time Tec, it's the new preferred tool to build smartphone applications and provide greater software solutions to the global community.