This is a pretty cool article on things you probably didn't know in Swift. Or maybe things you've seen in Swift code that gave you a "WTF does that mean?" moment. Or maybe you feel like being a hipster. Or maybe you want to be able to say, "Oh, I knew about that thing in Swift before it was cool!". Or maybe, just maybe, you love me and support me by reading my posts. So what are you waiting for? Hurry up and click the link already!
Viewing entries tagged
Subclassing can suck. There are so many ways to get it wrong and it's so easy to fall into anti-patterns when you create such a tight coupling between two classes. Most of the time, the need for subclassing can actually be replaced by abstraction through protocol-oriented, value-oriented, and functional programming. In fact, I may even argue that doing it that way can far outweigh the "benefits" of subclassing the majority of the time.