Pattern Matching, Part 3: Custom pattern matching & syntactic sugar
In parts 1 and 2 of this article series, we saw some usages of
switch on a lot of things, including
Character and even type. But what if we can use pattern matching even with our own custom types?
Pattern Matching, Part 2: tuples, ranges & types
In the previous article, we saw the basics of pattern matching using
enums. But what about using
switch with anything other than
Pattern Matching, Part 1: switch, enums & where clauses
From a simple
switch to complex expressions, pattern matching in Swift can be quite powerful. Today we’re gonna start exploring it by seing some cool usages of
switch, before going further in later articles with even more advanced pattern matching techniques.
Today we’re gonna see how we can be more efficient ⚡️ by… being la💤y 😴.
In particular, we’ll talk about
lazy var and
LazySequence. And cats 😸.
Asynchronous error handling
In a previous article, I talked about error handling in Swift using
throw. But what happens when you deal with asynchronous workflows, where
throw can’t really fit?
Using Generics to improve TableView cells
Happy New Year everybody 🎇🎉🎊🎆! My first post of 2016 will be a useful trick I want to share, which will demonstrate the power of Swift’s generics and how they can be really handy when dealing with
Let it throw, Let it throw!
Today’s article will be about handling errors in Swift.
Because let’s be honest, that makes a fun post title for the season ❄️☃️.
The OpenSource Experience
As you all know, Swift just went OpenSource earlier this week. That’s huge news for the community, and there have been plenty of posts about that already explaining what a game changer that is.
And now for something completely different™, today I’ll take this opportunity to talk about my own experience with OpenSource and how contributing to OSS can be very enlighting for everybody.
Mixins over Inheritance
When coming from an Object-Oriented Programming language like ObjC, inheritence is often used to share code between multiple classes. But that solution is not always the best, and have some issues.
In today’s article, we’ll see how Swift’s Protocol Extensions and their usage as “Mixins” can change the deal.