Using tuples as lightweight types in Swift

www.swiftbysundell.com

One really interesting feature of Swift is the ability to create lightweight value containers using tuples. The concept is quite simple - tuples let you easily group together any number of objects or values without having to create a new type. But even though it's a simple concept, it opens up some really cool opportunities, both in terms of API design and when structuring code. This week, let's take a look at how we can use tuples in our code, and some of the techniques that they enable us to use.

Read more...
Linkedin

Want to receive more content like this in your inbox?