We might be missing something here and I think ultimately Swift will be faster than Obj-C but it does highlight it's probably not wise to just start blindly converting all your code to Swift just yet until we get a better feel for what it's good (and not) good at.
Also with the fact that Apple says they will be breaking code as time goes on I'll also be on the Swift sideline for now.
Edit: Why are people finding this comment so offensive ?
> I think ultimately Swift will be faster than Obj-C
Is there something about the semantics swift that you think would inherently permit faster code than well-written ObjC?
Edit: I don't know why this comment was down voted -- it's a perfectly reasonable question that others have responded to. Oddly, the parent comment _I_ was responding too is apparently also being down voted. WTF?
Well, swift does a lot of type inference it's true but it doesn't appear to be more to be more strongly typed than ObjC (I could be wrong because I have only skimmed the ebook). A lot of ObjC code simply returns an id when it could return a tighter type. They seem semantically equivalent to me.
Typically a language's efficiency comes from its ability to restrict ambiguity. E.g. a scoped sequence of expressions without gotos allows the compiler to eliminate variables, reorder statements, unroll loops etc because it can see 100% of the uses of a variable by examining that scope. On the other extreme a language like BASIC is harder to optimize in such a fashion because the program counter could be set into the middle of the loop, and because all variables are global, they have to survive the scope.
I am genuinely interested if their are features in swift that aren't also in ObjC.
A language can be equivalent to another and still be easier to program in because the cognitive load on the programmer is lower so good code can be written more quickly. Swift seems to be an interesting attempt at doing that. But that's orthogonal to the question of compiled efficiency.
It is definitely more strongly typed than objective c. Swift's type inferencing is up there with Haskell, and Objective C/XCode's 'find all uses' is still string based.
Totally agree with your 'reduce ambiguity' observation, and I think long term Swift will do very well there. It will also will allow tooling to radically improve from what it is, and multicore to have a reasonable chance to be helpful.
Imo it seems a lot of the language decisions they have made are to make it more compiler/memory friendly (eg the way assign works with arrays). That bodes well for speed/memory/battery I think.
Also with the fact that Apple says they will be breaking code as time goes on I'll also be on the Swift sideline for now.
Edit: Why are people finding this comment so offensive ?