Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
July 26, 2014
arrowPress Releases
July 26, 2014
PR Newswire
View All





If you enjoy reading this site, you might also want to check out these UBM Tech sites:


Apple introduces new programming language, Swift
Apple introduces new programming language, Swift
June 2, 2014 | By Christian Nutt

June 2, 2014 | By Christian Nutt
Comments
    18 comments
More:



In a surprise move, Apple has introduced a new programming language called Swift. It is compatible with Apple's native Cocoa and CocoaTouch programming APIs.

Swift, which can be used to develop apps for both iOS and OS X devices, has already been released by the company in the beta version of Xcode 6, which you can download today, but will not officially be supported by those devices until both iOS 8 and OS X Yosemite are released this fall.

Notably, Apple has said that it can work "along side" Objective-C in projects -- though no doubt the company hopes developers will in time fully adopt it, tying their work to its platforms. The upside, as with its new Metal graphics technology, is faster performance for apps, Apple says.

You can already download a book on programming in Swift from Apple's iBooks store. The company has also opened up a developer portal for Swift which further details the new language and offers links to related resources.


Related Jobs

Cloud Imperium Games
Cloud Imperium Games — Austin, Texas, United States
[07.25.14]

DevOps Engineer
Cloud Imperium Games
Cloud Imperium Games — Austin, Texas, United States
[07.25.14]

Animation Programmer
Cloud Imperium Games
Cloud Imperium Games — Austin, Texas, United States
[07.25.14]

Server/Backend Programmer
Cloud Imperium Games
Cloud Imperium Games — Austin, Texas, United States
[07.25.14]

Lead Online Engineer










Comments


George Menhal III
profile image
Hopefully Swift will be a more intuitive language than Objective-C, which I find to be unnecessarily obtuse for those who wish to make applications for Apple's platforms. I am very highly interested in this announcement and will be taking a look at the free book right away. This and Metal are both very, very cool developments in my opinion.

And of course, more kudos to Tim Sweeny and his demonstration of Unreal Engine 4. Every time I see the engine in action, I am more impressed.

Charles Cresswell
profile image
So would this be a move by Apple to reduce cross-platform development? How easy would a Swift app be moved to android or windows phone compared to O-C?

E Zachary Knight
profile image
Yeah. Looks like the OpenFL and Haxe community will have quite a bit of work cut out for them as they fix iOS and Mac compatibility.

Lars Doucet
profile image
Haxe is like a friendly version of the Borg, they'll just release a Swift target for Haxe :)

Lennard Feddersen
profile image
I'd like to see the business case for Swift over building a C# app. for Unity which can deploy everywhere including the desktop web.

Amir Barak
profile image
Actually Mono rather than Unity in this case.

Husam Aldahiyat
profile image
Same here. I'll continue using Unity for multiplatform development (even apps), but I'm still jumping on board the Swift train out of interest. It looks very sexy to use and I'm going to rewrite my iOS Unity plugins anyway so might as well get up to speed on it.

Alan Barton
profile image
@"is faster performance for apps, Apple says."

No Apple, that would be C/C++ and its also faster to port applications to support your platform.

This has nothing to do with performance for apps, its a lock-in tactic, pure and simple. Every attempt a company tries at lock in gives me the burning need to bill them for the extra development time they waste. They cost us all time and money, which would be better spent developing new apps.

John Maurer
profile image
Exactly, nothing is going to out-perform C/C++. C++ 11 has already introduced tons of new features, making it even easier and more robust (variadics, smart pointers, tuple's, initializer lists, hash_map/unordered_map, I can go on and on). It's another lock-in tactic, which I hope proves to do nothing more than alienate them further from the rest of the world

Greg Scheel
profile image
One language to rule them all,
one language to find them,
one language to bring them all,
and in binaries, bind them;
in the land of Cupertino, where the apples lie.

Simon Dawson
profile image
Would appear Apple is attempting to make this happen,

Bret Victor - Inventing on Principle
http://vimeo.com/36579366

maybe MS will follow with Visual Studio one can only hope.

As for performance it is on top of LLVM same as C++ and ObjC any performance increases are almost certainly due to better syntax understanding by front-end for the LLVM compiler.

It is going to be interesting to see how it stacks up performance wise.

as for locking in development nothing has changed at all. Any core code stays in c++ or any other LLVM supported language.

The normal abstraction of platform API's for cross platform development still apply as always.

The JIT compiler appears development only which is good news IMO.


@Lennard Feddersen business case for Swift over building a C# app and Unity ?
not everyone makes games for a living

and C# is MS thing Apple is not going to tie a rope to that ship.

Charles Forbin
profile image
I'm going to be a radical and try it out instead of bashing it sight unseen like some old graybeard.

I know, I know. I'm a heretic and unmutual.

John Maurer
profile image
Get over yourself.

George is as optimistic as you are, Charles, E Zachery & Lars are talking about compatibility, Lennard and Amir are wondering why they should learn a new language when C# via Unity is already a viable resource, and Alan & myself find the idea of citing "increased performance" as a key feature a little silly with C++ in-play.

And then there's Greg, whose Tolkien rework is a freakin masterpiece.

No one's outright bashing, but many of us are wondering, why? No matter how nice the language is it still becomes a barrier to cross-platform, which I personally thought they put a cap on with objective-C.

Maybe they could have just extended the Cocoa API and called it quits?

Charles Forbin
profile image
The keynote, Apple's site, and about a million web pages of discussion already can answer your questions. While some sit scratching their beards I've already down loaded the beta and written Swift code. Dive in and play.

Andy Lundell
profile image
That's great! No one's saying you shouldn't play with it and have fun.


But ..., if you're trying to make money, or even just trying to get your art out to a wide audience, then you're taking a terrible penalty if you use a language that doesn't support Android or Windows.

Wendelin Reich
profile image
I get that Apple wants to offer a modern alternative to Objective-C users who have already decided against doing cross-platform development.

What I don't get is why Apply has to create a "new" language *even then*. There are already tons of well-understood, well-supported new languages that offer most of what Apple claims Swift can do, and that could easily be extend to the the remainder. Closures, tuples, multiple return values, generics, etc., etc., none of this is exactly cutting edge, and neither is its combination in one language.

Robert Green
profile image
I'm reminded of what they did with the lightning cable. Were there good reasons to replace the old one? Sure. Is the new one a significant improvement? Sure. Would everyone else preferred it if they had just gone with an existing standard? Most likely.

When you step back and look at what apple announced yesterday, there is a big common theme of lock-in. There's the new programming language that only works on their platforms, the new graphics API that only works on the latest revisions of their hardware, big updates to their messaging app that only works on their platforms, some new features to increase interoperability between iOS and OSX, even a new home automation platform to help make your whole house reliant on apple products.

The 'why' question is obvious - apple are a hardware company. They make software, but only as a means to sell hardware. That's why they stopped charging for most of their important software - it just presented a barrier to selling more hardware.

Simon Dawson
profile image
Apple's Metal API is the same concept as AMD's mantle and MS DX12 and Sonys PS4 stuff.

Apple does not control OpenGL standards so cannot make a OpenGL direct hardware version.

Kronos Group do create one for opengl then Apple has something to support atm all companies have there own direct hardware solutions to bypass the performance loss due to hardware abstraction if you need that extra performance otherwise use opengl es.


none
 
Comment: