Skip to main content

Write Swift code in a web browser with the IBM Swift Sandbox

IBM has today unveiled their first public effort towards Swift, with the introduction of the IBM Swift Sandbox website. You can type lines of Swift code into the text editor on the left and then run the code on a Linux server, posting the output in the right column. This is all made possible by the fact that Swift is now open source, supporting Linux alongside iOS and OS X.

You can use the core Swift language as well as the standard library functions, so writing a formulaic mathematical problem (like the Fibonacci example above) is well within the scope of the web application. The concept is similar to the CodeRunner app from the Mac App Store, except it runs entirely off a cloud infrastructure.

This shows the potential path for future application development. More a cool tech demo than anything else, it’s rudimentary and impractical for any serious work but gives a glimpse into the sort of stuff that taking Swift into open-source realm enables. It’s also interesting that IBM is supporting Swift from the outset (the blog post openly states “we love Swift here”), showing potential for future enterprise opportunities. Apple and IBM already have a tight enterprise collaboration for bringing iOS and iPads into the corporate business world.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

  1. cwoloszynski - 9 years ago

    I have been coding in Swift for ~ 6 months. It is a great language, expressive and powerful while being safe. My projects are iOS and OS X with backend code in Node.js. With this release, I think I can safely envision a future where I could even write the server side in Swift and get away from Node.js and Javascript’s funky class/prototype design.

    This is great news and another step towards a better, safer way of programming. Swift for the masses!

    • And on the other side JavaScript is now possible to use for both client and server :D

      • cwoloszynski - 9 years ago

        But Javascript is not really a modern language with strong coding protections. I prefer guards, optionals, strong class support, … but that is just me.

  2. Jim Avery (@j_l_avery) - 9 years ago

    In the future we’re planning to add code sharing, so you can link people directly to your Swift solutions on Stack Overflow and such. Hopefully that takes it out of the realm of “tech demo” and makes it a useful learning tool.

  3. Gerard Van Den Elzen - 9 years ago

    case 0,1:
    return n

  4. Jurgis Ŝalna - 9 years ago

    This could go nice with a enterprise database. Perhaps IBM marry it with Cloudant?

Author

Avatar for Benjamin Mayo Benjamin Mayo

Benjamin develops iOS apps professionally and covers Apple news and rumors for 9to5Mac. Listen to Benjamin, every week, on the Happy Hour podcast. Check out his personal blog. Message Benjamin over email or Twitter.


Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications