Apple has released the latest beta of its Xcode development environment to the general public, and with it Swift, the company’s latest innovation in programming.
The Beta of Xcode 6 is the first to be released to users without a premium, paid-for Apple Developer Account. It features a number of significant changes to the development experience, including (for the first time) a REPL (Read Eval Print Loop) and other visual enhancements that make development easier.
The most significant enhancement to Xcode is something called Playgrounds, which make it possible for you to easily experiment with new ideas with the Swift programming language, which Apple demonstrated at the previous World Wide Developer Conference in San Francisco.
Curious to see what’s new in Xcode 6? Read on for more information.
Introducing Swift & Why You Should Care
For the longest time, the only way to create native iOS applications was with Objective-C and C++. These each inherit traits and styles from an earlier programming language called C.
The problem is that C and its derivatives aren’t the most welcoming of languages for beginners. Apple, eager to attract new developers to its platform from Android and Windows Phone, created Swift, which is a language that allows you to create fast, native iOS applications without using any of the legacy baggage from C.
Swift is new – really new. It’s not even been properly released to the public yet. As a result, there’s not really the same amount of support and learning material that exists for people getting to grips with Java, Python, C# or Ruby.
Thankfully, Apple have released a book that will teach you the intricacies of the Swift programming language. It’s called The Swift Programming Language, and you can get it for free on iBooks right now.
Getting Xcode 6 Beta 4
Until recently, you could only get your hands on the Xcode 6 pre-release betas with an expensive Apple developer account that costs $99 yearly. This also grants you access to OS X Yosemite and iOS 8, although my colleague Tim Brookes doesn’t think you should install these yet.
Thankfully, all you need this time round to try out Xcode and the new language is a free developers account which you can get simply by signing up.
You’ll need a Mac, because Xcode is Mac software – there is no Windows version. Xcode 6 is big, weighing in at around 2GB. If you’ve got a slow Internet connection, you might be waiting for a while. Once installed, it will sit happily next to existing copies of Xcode rather than replace them.
Fancy giving it a go? Download Xcode 6 beta from here.
What’s New In Xcode 6?
A lot, actually.
But first, let’s talk about a feature of a number of popular programming languages: REPLs. These stand for Read Eval Print Loop, and allow you to interactively run code. They take an expression from a user, evaluate it and run the code, and then print out the results of the operation.
These traditionally have not been found in compiled languages, although there are a few notable exceptions, such as the CSharpRepl in the Mono implementation of C#.
Swift is different. For the first time, people using the beta of Xcode to write Swift can see their code executed as they write it, allowing them to easily debug, plan and experiment with code.
There’s also an interactive Swift command line, where you can execute Swift in a line-by-line, Script-like environment.
Other features included in Xcode 6 Beta 4 include significantly improved UI debugging; Storyboards for OS X allowing you to create containers and animations for your Mac applications without writing a single line of code; and new tools for easily creating games.
The new games-specific development tools, mixed together with the new Metal API for blisteringly-fast graphics performance and the rapid application development capabilities of the Swift language mean that in years to come, we can expect faster, better and more numerous games on the iOS platform.
Even if you’re not a developer, there’s a lot to get excited about from Swift and Xcode 6.
Are you excited about Apple’s new development tools? Share your thoughts, below.