Share this page

by Jon Hoffman
Swift Version: 1.1

In this post I will explain how we could use tuples to model our data and then I will show how I would replace the data model classes from my previous "Create a Data Access Layer using SQLite.swift" post with tuples. When we replace data modeling classes or structures with tuples our code can become much more compact and in some ways easier to understand however we do lose the ability to add functionality to our data model types, but is that a bad thing?

© 2015 SoSoSwift. Blog · About · Contact · Privacy policy · Terms of service · RSS