Swift, Apple's hot new programming language, is now open source. It is available (or will be once the web site isn't so overwhelmed!) for Mac and Linux under an Apache 2.0 license.
"Swift is now open source! 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. "
Apple's Swift programming language may eventually replace the respected but arcane Objective C as the native language for OS X and iOS development, but if you don't have a Mac you might be forgiven for not having taken an interest so far.
However, as MacRumors now reports, Apple have now delivered on their promise to open-source Swift and release a Linux port. It doesn't sound as if the Linux port is quite ready for production use just yet, but the source is out there. Does this mean that Swift is now a contender for general purpose programming?
(Note: at the time of writing, the servers at Swift.org are failing to live up to their name.)
(Score: -1, Troll) by Anonymous Coward on Friday December 04 2015, @09:03PM
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
import Darwin
#else
import Glibc
#endif
Come on code in comments?? HMTL was broken for these very reason. Compiler directives (it is still code) should a compoiler directive, not a hyper load of comment.
It is why children should not be running the tech world.
(Score: 0) by Anonymous Coward on Friday December 04 2015, @09:54PM
HMTL
Hypermarkup Text Language?!
(Score: 0) by Anonymous Coward on Friday December 04 2015, @10:16PM
The code in the comments was tacked on later. HTML is for rendering rich text, not running office suites loaded from a web-server.
(Score: 2) by Nerdfest on Friday December 04 2015, @10:25PM
If think he's referring to the annoying but ubiquitous tests for the various versions of the horror that is IE.
(Score: 5, Informative) by bryan on Friday December 04 2015, @10:17PM
Comments in Swift [apple.com] follow the C style (/* multi-line*/) and C++ style (// single-line) form.
The "#" is a type of preprocessor directive [apple.com] and not a comment.
(Score: 2) by BasilBrush on Saturday December 05 2015, @11:12PM
Thankfully they've only implemented conditional compilation, not #defines.
Hurrah! Quoting works now!