Dealing with Swift toolchain

Design a project that uses different versions of swift for different parts of the project. Combine multiple toolchains together and use it.…

Any[Object]

You use Swift AnyObject wrong. Don't use AnyObject as a generics constraint. Don't do "is AnyObject", "as? AnyObject" to check if a variable is a class type. Don't use "AnyObject". Use "class" for a class-only protocol. Use "Any".…

Swift Runtime Performance - talk

Last week I had my last appearance with talk about Swift runtime performance. I enjoy the topic, and I had a ton of fun with preparing the speech, with the on-stage experience and afterward discussions. Since I'm done with this talk, I'd like to make a note and small summary.…

Peculiar inheritance of enum

It turns out that Swift 3 nested enums combine options, but it's not inheritance. It's a little know "feature" you should be aware of when designing API with Swift 3. I didn't know that, and my (I have to admit reasonable assumption) lead to the problem that can't…

Conditional Swift testing

The problem Some tests need to be skipped when executing on CI (continuous integration like travis.org). What tests? In my case, it's performance tests. Why? because I can't trust all CI results and sometimes, randomly, some tests will fail without good reason, like this one: error: testPerformance : failed: The…