Apple Releases Swift As an Open-Source Project (swift.org)
jcr writes with the news that Apple's Swift has gone open source: From Apple's press release: "We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere."
It's listed at Apple's GitHub repository, too. (Hat tip to Jono Bacon.)
The specification may be open (or not); that does not mean that the code that creates the language interpreter or compiler is open.
In this case, it is. That's laudable, at least in the broadest sense.
As for the remark that Swift is "growing faster than anything else we can track" in TFA, well, okay, but grass grows faster than redwoods, too, but that doesn't mean it's going to get as tall. :)
I've fallen off your lawn, and I can't get up.
What major programming language isn't corporate controlled? PHP Group is a corporation, Perl Foundation is a corporation, Python Software Foundation is a corporation, Ecma International (ECMAScript) is a corporation, and International Organization for Standardization (C, C++) is a corporation.
and what is there to gain for an old school C programmer who doesn't particularly enjoy C++ ?
SWIFT is more or less ObjectiveC made sane. It's basically the same underlying world view, but with a new language with a unified syntax (where as ObjC is like two unrelated languaged bolted together), reduced undefined behaviour, no pointer arithmetic (by default? not sure. Pounters aren't exposed in the same way).
ObjC and so Swift are both very late bound languages, so have a very dynamic feel to them.
SJW n. One who posts facts.
RemObjects makes a free Swift compiler that targets .NET, and thus the binaries would run on Windows. It targets Android too, so you can do Swift on Android as well.
Of course, none of the OSX/iOS frameworks are provided on non-Mac platforms. You're expected to to use the frameworks already provided by the platform you are targetting.
When Sun made Java they said "what would we improve about C++ if we had the chance?". Separate from the JVM concept, this is what they were thinking when they made the language. Back when Java was new people joked it was C+++. When Microsoft made C# they said "what would we improve about Java if we had the chance?".
Apple basically said "holy FUCK we need to get away from this shitty 80's language, C# does some good stuff, but what would we improve about it if we had the chance?
So in C# you used to have to declare something like this:
Then languages started asking themselves "wait, why do we have to say the class name twice? We could just get away with just doing it once"
Swift says "wait, why do we need semicolons? I mean yeah it used to be that we didn't have great ways of telling lines apart but we've solved that problem now. If there's just the one statement on a line no need for a semicolon. And why do we need to say "new"? We know it's new. The calling of the class name via the constructor tells us that. Get rid of that shit too"
Back when c# introduced "var" I was dead set against it. When Swift dropped semicolons I thought it was reckless. Now that I've been using Swift a while I get their minimalist religion. It's a struggle to go back to C# or JS and have to remember semicolons (although JS doesn't seem to give a shit either way)
To declare a constant in C# you declare its type as well as use a keyword
In Swift, they said "well, we're already using var, why not just swap that out for a constant?"
and the compiler in Xcode now shows you all the times when you could use a constant, which is way more often than you realize.
For all the spitballing about platform this and proprietary that, underneath it all Swift is the latest attempt at a language that uses what we've learned from previous languages. And it's possible some or all of their conventions have been used by other recent languages that just got an eyeroll from working developers but Swift has this tremendous advantage in that it has a compelling use case: iOS developers who don't want to use Objective-C. Because no one really wants to use Objective-C. Anyone who says they do is a victim of Stockholm Syndrome.
Schnapple