Apple Speaks a New Language


At its Worldwide Developers Conference (WWDC) earlier this week, Apple announced the latest iOS 8 and Mac OS X “Yosemite” operating systems. Apple fanboys will appreciate the attention to pixels included in this latest revision. And after all the glitz of the OS updates, the keynote speakers followed up with a new product most Apple users will never even notice: Swift. Swift is a new programming language, crafted to meet the needs of iOS and Mac OS app developers. In the vernacular of software developers: It’s about (reader.Age >= 18 ? GetNextCurseWord() : “”) time!

Anyone who is serious about creating software for Apple platforms has had to contend with Objective-C. It’s a powerful language, in much the same way that a weapons factory is powerful. You can build something really awesome, but first you have to get access to basic components and crude raw materials, engineer a complete assembly-line process with little room for error, and fill out the requisite government forms. Swift, it seems, is out to change that.

A quick glance at some sample Swift code shows it to be an amalgam of different language sources. It has curly braces and other syntactic trappings common to most C-like languages; a love for data manipulation found in JavaScript and other web-centric scripting tools; generics, inferred strong typing, extension methods, and other modern conveniences from platforms like Microsoft’s .NET Framework; and just a hint of excess baggage from Smalltalk. And the most surprising progenitor is found in the very first language Apple ever took seriously: BASIC, especially its ability to process code logic outside the context of a full application. Showing off the immediacy of the language’s always-doing-something compiler was a major selling point during the keynote demo.

Apple isn’t the only company to craft a new language. Late last year, Google put the finishing touches on Dart, its self-proclaimed JavaScript-killer. Microsoft, already the proud owner of two popular coding systems (C# and Visual Basic), continues work on the open-source TypeScript language, a strongly typed superset of JavaScript. And who can forget Mozilla’s own unfortunately named Rust language. Of these software newcomers, TypeScript and Swift will likely gain the most traction, since they both exist to address widespread difficulties in two very popular development languages, but in ways that leave current investments in legacy source code intact.

A prerelease edition of Swift is available right now as part of Apple’s Xcode 6 beta release. You can also download a free ebook edition of the Swift language guide.


Please enter your comment!
Please enter your name here