So it looks like the language isn't open source and won't target non-Apple runtimes? I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.
Combine this with their OpenGL replacement ("Metal") and that pretty much kills any cross-platform at all doesn't it?
The Swift Programming Language
281–290 of 970 posts
Re: The Swift Programming Language
#282Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";
You say "Apple syntactic craziness", but "var" is identical to JS, et. al. and "let" is identical to ML, et. al. The string interpolation syntax is unique, but kind of makes since given then \ is the escape character in C strings.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re: The Swift Programming Language
#283Re: The Swift Programming Language
#284Is anyone getting the vibe that swift is golang for writing Cocoa apps, or is it just me?
Re: The Swift Programming Language
#285Re: The Swift Programming Language
#286As it is now I won't be able to use Swift because of that :(
Re: The Swift Programming Language
#287Feels like they looked at a bunch of programming languages, took all their favorite features, and then put them into one which still sits on top of the ObjC runtime. And then added some Apple syntactic craziness. For example: var apples = 3; // mutable let oranges = 5; // immutable let summary = "I have \(apples) apples and \(oranges) oranges";
Using the backslash+parens for interpolation is really clever! No more ambiguity like when using % or {}. Is that a Swift original syntax?
Re: The Swift Programming Language
#288So it looks like the language isn't open source and won't target non-Apple runtimes? I'm not trying to troll, I just think that it's a pity that Apple tends to limit the ecosystem and applications of its otherwise-great languages. Building against LLVM ought to make it fairly trivial to make this cross-platform.
Is there anything to stop a independent implementation? Like C#/.Net and Mono?
Re: The Swift Programming Language
#289With a graph showing ObjC at 127x faster than Python, Swift 220x faster than Python.
Thus the conclusion is 220 - 127, Swift is 93x faster than ObjC.
Someone needs to resit their GCSEs.
Re: The Swift Programming Language
#290Earlier quoted context omitted.
I'm old enough to remember Apple suing Microsoft for "copying their look and feel". Open source is something Apple only does strategically - when they have to or it suits them - it is not part of the company's ethos. http://en.wikipedia.org/wiki/Apple_Computer,_Inc._v._Microso... .
Yeh, I agree. I was surprised when they open sourced webkit. But like you said, it's strategic. I don't think they care that much about the browser. Their emphasis is on apps running in their ecosystem.