Browsing Category
Swift
3 posts
Simplify your protocol dependencies using functions
Our code is full of dependencies. We couldn’t write very useful applications without them! When it comes to swapping in different implementations, the first tool that likely springs to mind is protocols.
Check an enum case without a switch statement
Enumerations are great when you need to define a common type with multiple related values in a type-safe manner. Often you’ll process these using a switch statement, but how do you check for a specific case without using a switch statement?
What’s the difference between Structures and Classes in Swift?
Structures and classes are the building blocks of our systems as Swift developers. They are general purpose containers from which we design our applications.