I Want a Type-alee-uss-ess-ess for Christmas
Associated Types Series
Sometimes I think type theory is deliberately obtuse and all those functional programming hipster kids are just bull-shitting as if they understood one word of it. Really? You have a 5,000 word blog post about insert random type theory . . .
Or the case of the disappearing values
While trying to create a new view controller in Swift I ran into a curious problem with initialization. The class was a relatively simple subclass of
UITableViewController containing a property
var values:[String] and an initializer
required init(values:[String]) that delegated to the
super.init(style:UITableViewStyle) initializer. So far, so . . .
Interop is easy right up until it isn't
Swift and Objective-C use the same runtime. They use the same ARC memory management. They certainly interoperate far more than most languages except perhaps ones targeting the CLR. You might be forgiven for thinking that writing new classes in Swift would be easy, but there are several gotchas you might encounter:
You . . .
Ah for those carefree days
Welcome to another glorious Swift post, brought to you from foggy outer sunset in San Francisco. I'm working full time on iOS and loving every minute of it.
Today, let's talk about optional method chaining and
respondsToSelector. Normally in Objective-C land, we have to do a little dance any time we want to handle selectors that may . . .
Warning: not a technical post
I hate posting business-y kind of stuff so I'll keep these kinds of non-technical posts infrequent.
We're a startup creating software for . . .
In the lifecycle of any release there comes a time when known bugs are far better than unknown bugs you accidentally introduce. Obviously Apple has reached that point with iOS 8, the SDK, Xcode 6, and Swift. The version shipping in the Xcode 6 GM is certainly a good release for Swift, but did you know there is a newer version of the compiler . . .
Warning: some assembly required
Previously, I did a horrible thing by hooking up to a Swift internal library function then probing to determine its arguments.
In today's post I want to cover how I went about doing that. Perhaps it will help you in your debugging adventures.
Taking the Dump
The first step is to dump the dylib exported symbols so we can go sifting for . . .