Tuesday 8 December 2015

(Image: Valerie Loiseleux/iStockphoto)

IBM's Swift Sandbox Lets Coders Try Apple's Programming Language Easily

IBM announced its free, browser-based Swift Sandbox, which lets developers write in Apple's programming language and execute their code in a server environment -- on top of Linux.


Shortly after Apple open sourced its Swiftprogramming language last Thursday, IBM launched a free browser-based online sandbox to help developers get started writing code.
Swift has already been ported to Linux, and Apple has said it will not object to other OS ports. In fact, this Linux port is what enabled IBM to create this sandbox. The IBM Swift Sandbox uses a Docker container for the runtime environment, which allows Swift to live in the cloud just fine.
This means developers can run Swift code snippets on any browser over the Internet, not just a specific IDE. This is the kind of accessibility that encourages learners such as students to dabble in a language before making a commitment to deep-dive into a programming environment.

The sandbox allows for input of Swift code (which is object-oriented and looks a lot like C structurally, but is not as complicated as Objective-C) in one window. Hitting the Run button in the sandbox sends the output to another pane.
IBM says it is committed to Swift in a big way. As IBM engineer Patrick Bohrer put it in weekend blog post, "It is an exciting time to be in our industry and especially be anywhere near Swift. … The Swift development community is the same community that is helping build the applications that are, literally, changing the way we live our lives. We think there are endless possibilities here. We hope you think the sandbox is as fun as we do and that it also empowers and inspires our collective creativity."
Microsoft has joined the party as well. In February, it brought out Silver, a way to use Swift with Microsoft frameworks. The company said at the time, "With Silver, you can use Swift to write code directly against the .NET, Java, Android and Cocoa APIs. And you can also share a lot of non-UI code between platforms. Silver supports three platforms, but is decidedly not cross-platform, focusing on letting you leverage the Swift language natively for each individual platform, rather than encouraging mediocre cross-platform apps. With Silver, you can share your language and tool expertise, and you can share a lot of back-end business logic code -- but you will use it to write apps targeted at each platform individually."
Swift seems poised for rapid adoption by developers with the flurry of recent events. By making it open source and supported by different platforms, the "write once, run everywhere" goal developers have sought for so long seems closer than ever.