This is a great example of how an API should be. Most of the time it works right out of the box with a simple protocol conformance. For non-standard cases it’s flexible enough to let you provide custom behavior. My only question is the decoding performance.
Constrained associated types is a small but very welcome change. Several times I’ve had to workaround this issue by pushing the
where clause to a protocol extension, but that doesn’t make any guarantees on the associated type itself. Consumers could still use the protocol in unexpected ways. Now I can express my intent more clearly and safely via the type definition.
private scope change looks great and makes a lot of sense, but wasn’t clear whether it will work across files.
Several of the major Swift and Xcode features are supported via code generation by the Swift compiler, such as
Codable and the Core ML model integration. I hope this is eventually exposed to developers.
Code Editor and Refactoring
It was obvious that Swift refactoring support would be the big reveal, although the implementation surpassed my expectations.
The more interesting thing to me is that the entire refactoring engine is open source and able to work with community additions. They didn’t reveal much more than that so it’s not clear just how flexible it is. Maybe we will see a nicely integrated Vim implementation that can take advantage of the new editor speed too.
From what I’ve heard so far, SourceKit hasn’t improved by much and still leaves a lot to be desired in Xcode 9 beta.
Interface Builder and Auto Layout
Both of these received some neat additions, such as the safe area layout guides and being able to use
isHidden in size classes.
It still feels like there’s a big disconnect when working with Interface Builder and code. Often times I’ll give fake values for labels or a default picture for my images to make sure the layout looks right, and then dynamically load the data into the layout at runtime. Of course I wouldn’t want these dummy values showing up on the device, so I need to clear them out somewhere in the initialization step. I hoped they would finally support placeholder values like Android does.