Hacking slightly better sum types without Go generics Go doesn't have real sum types, but we can at least hack together an exhaustive switch helper, without requiring generics.
Statically-Typechecked Duck Types in Swift I present a hypothetical new Swift language feature which would allow something like duck typing in many use cases. This feature would be particularly useful in tests, where currently no good mocking/stubbing solution exists. The solution I propose achieves flexibility while maintaining the safety …
String is not a sufficient type: how using your type system can help you make better software We deal with types, explicitly or implicitly—depending on our language of choice—every day. We often use them without even thinking about them, or we consider them an annoyance when we’re just trying to get something done. This brief talk presents an accessible metaphor to help explain that type sy…
Multiple Inheritance vs. Traits or Protocol Extensions A friend asked me at WWDC how Swift protocol extensions (or Scala traits, or Ruby mixins) are substantially better than multiple inheritance. Here are a few links and thoughts.
IBOutlet declarations in Swift Xcode’s default IBOutlet declarations are weak references to implicitly unwrapped optionals. This is wrong.
Let’s talk about Optionals There has been much complaining that Swift's Optional type forces you to think about whether something may be nil at every use, but aren’t we thinking about that already, just maybe implicitly? Swift’s optionals simply formally enforce the thinking we already must consider when writing (or …