As you already know, Swift is great for microservices. However, there are a couple of features that apply specifically to Swift and make it very convenient to develop microservices. Swift, as a language, is quite young, so many popular features in other languages were not readily available in Swift when it started out. In this section, we will look at some of the Swift-specific features that can help with writing microservices.
We'll explore the following two features of Swift:
- Shared libraries: The ability to write a library that can be used by more than one service.
- Generic functions and classes: Save yourself time by utilizing Swift's features.
Let's start with shared libraries.