iOS8 & Swift nu mai par sa fie asa simple cum au fost prezentate in avanpremiera

Posted on July 15, 2014, by , under Mobile.

“Swift looks interesting, but in all of Overcast’s development so far, I’ve never run into a problem that’s the language’s fault that Swift would have handled better. It appears to solve problems I don’t have, to gain small (and still theoretical) optimizations that I don’t need, at the expense of many Objective-C features I really like.

I don’t even know if Swift saves a lot of complexity, as it promises: its code appears smaller, but it’s far more dense, which is deceiving. Simpler code is great, but less code that isn’t actually simpler doesn’t inherently help — it’s just harder to read, harder to learn, and more prone to hard-to-see bugs. Most Swift code samples I’ve seen haven’t been much simpler than Objective-C equivalents — just shorter.”

“While your app’s runtime compatibility is ensured, the Swift language itself will continue to evolve, and the binary interface will also change. To be safe, all components of your app should be built with the same version of Xcode and the Swift compiler to ensure that they work together.

This means that frameworks need to be managed carefully. For instance, if your project uses frameworks to share code with an embedded extension, you will want to build the frameworks, app, and extensions together. It would be dangerous to rely upon binary frameworks that use Swift — especially from third parties. As Swift changes, those frameworks will be incompatible with the rest of your app. When the binary interface stabilizes in a year or two, the Swift runtime will become part of the host OS and this limitation will no longer exist.”

de aici

Leave a Comment