Swift Around the Web
@AirspeedVelocity points out that in Swift, you can have two functions with the same name, but a different return type. So which function gets called? The result will shock you! Really, this is an incredible article, so take a look and find out for yourself :) And of course there is a must-see sequel - Which function does Swift call? Part 2: Single Arguments.
If you've tried out Swift at all, you've probably seen the compiler warning about AnyObject. Well, the warnings go away sometimes when Foundation is imported or if your Swift class is marked for usage with Objective-C. @ColinEberhardt points out the issues with AnyObject which make your code a lot less safe.
@ColinEberhardt shows how memoization can be used to cache the return value of a function in order to improve performance. For those of you who secretly have no idea what memoization is - "memoization is an optimisation technique where the return values of a function are cached to avoid repeating the same computation."
Swift Property Observers are similar to KVO in Objective-C. @CodingExplorer explores swift property observers in more detail.
@nicemohawk shows a very small and simple use-case for Generics. He writes: "Being able to make this kind of simple extension to a low level type and having it just work makes me a little more open to the idea of Generics invading our little corner of the software development world."
"The word polymorphism is not to be found anywhere in a search of Apple's two iBooks about the Swift language (and its use with Objective-C). But don't take this to mean that polymorphism is absent from Swift."