Apple unveils Swift, a brand new Xcode programming language for developers
Calling it "fast, modern, safe and interactive," Apple on Monday unveiled Swift, a brand new Xcode programming language that it says is superior to Objective-C.
In a demonstration, Apple showed off the "Swift Playground," where developers write code and how results are displayed as soon as code is written. Apple says Swift was designed from the ground up for Cocoa and Cocoa Touch.
Swift can be used for basic apps, like social networking, or advanced 3D games using the new "Metal" graphics optimization. And because it operates alongside Objective-C, developers will be able to seamlessly interchange languages.
Included in Swift are Generics, which allow developers to get more done with very little code written. In one example, an entire list of images was loaded with one simple line of code.
Swift Playgrounds also allow developers to see the entire history of a value over time as an application runs. Swift also includes full control of time, so a developer can fast forward or backward to see how their app might react in certain situations.
When it ships, Swift will have complete Xcode support, and a language guide is already available to developers on the iBookstore. Developers will also be able to submit apps written in Swift to the App Store when iOS 8 launches later this year.
In a demonstration, Apple showed off the "Swift Playground," where developers write code and how results are displayed as soon as code is written. Apple says Swift was designed from the ground up for Cocoa and Cocoa Touch.
Swift can be used for basic apps, like social networking, or advanced 3D games using the new "Metal" graphics optimization. And because it operates alongside Objective-C, developers will be able to seamlessly interchange languages.
Included in Swift are Generics, which allow developers to get more done with very little code written. In one example, an entire list of images was loaded with one simple line of code.
Swift Playgrounds also allow developers to see the entire history of a value over time as an application runs. Swift also includes full control of time, so a developer can fast forward or backward to see how their app might react in certain situations.
When it ships, Swift will have complete Xcode support, and a language guide is already available to developers on the iBookstore. Developers will also be able to submit apps written in Swift to the App Store when iOS 8 launches later this year.
Comments
I wish I knew how to program (as I have great ideas on games/apps but not a lick on how to program), but this seems more like an attempt to make their games a bit more exclusive to their platform.
Amazing. No one expected this.
Yup - this was definitely underwhelming. No new 6" iPhone.
/s
I was turned onto a video by GatorGuy a few years (years?) ago. Can’t find the link. Maybe he can. I have the video downloaded, but uploading it again would be unnecessary.
EDIT: FOUND IT.
This guy’s giving a talk about software development and the power that could be afforded to developers if the coding software gave them realtime feedback. It blew me away, because that’s exactly what is needed! Being able to see where elements on the screen are going, changing them on the fly, building the world based on the realtime feedback, scrubbing through the execution, etc.
And Swift+Xcode is much exactly that.
I am absolutely thrilled by this. Can’t wait to see it in action.
This is what Apple has over Windows and Android. The mentally inadequate scream that features are being “copied” (ignoring that they’re not), while refusing to acknowledge that they don’t even have anything remotely like what Apple has on the back end.
From the icon, I expected the language to be called Peregrine. Swift works, too.
I wish I knew how to program (as I have great ideas on games/apps but not a lick on how to program), but this seems more like an attempt to make their games a bit more exclusive to their platform.
Swift isn't a gaming API it's general purpose. If a developer wants to keep things portable they'll simply write as much OpenGL code as they can.
https://itunes.apple.com/us/book/the-swift-programming-language/id881256329
iBooks says it is unavailable.
I went in through iTunes, not iBooks, and was able to download it. Maybe they flipped the switch and it's now available.
Oooh, very exciting, can't wait to try this. I tried to get into iOS development, but just couldn't wrap my head around Obj-C
You can do iOS development in C/C++. Makes the code portable if you plan to go that route. I am curious to learn more about Swift. Objective-C was a tad slow and I am forced to treat all warnings as errors to avoid threads dying and leading to bizarre behavior.
Its not available yet in iBookStore.
//Edit: Sorry. Its available.
Wait, what? How is putting Swift, C and Objective-C code in the same file going to work? Some sort of .swift{} tags around the code so that Xcode knows which bits are which language?
I wish I knew how to program (as I have great ideas on games/apps but not a lick on how to program), but this seems more like an attempt to make their games a bit more exclusive to their platform.
Spend some time and learn the language..."I wish" is not working in the tech world.
//Edit: Sorry. Its available.
Link’s broken and I can’t find it manually BECAUSE SUBCATEGORIES AREN’T IMPLEMENTED YET. Anyone have a fixed link?
There's no way anyone that gives a shit about software could feel "udnerwhelming" by this keynote. It was the single most impressive event, that I've EVER seen from Apple when it comes to iOS/OSX features, API, and development tools. Not only did they address pretty much every major complaint in some ways, they added features that I didnt even imagine, but make perfect fucking practical sense. Apple has clearly been busy, and all the additions and changes are thoughtful, well considered features that are incredibly practical and useful. I was literally cheering at so many points. Cant WAIT for the new OSX and iOS- the phone/message integration and "continuity" features will be used by me literally all the time. Hardware announcements will come later, but this exceeded my expectations in terms of software. Well done Apple- you haven't lost your touch, and are firing on all cylinders. iOS development was already far, far ahead of Android dev, but these improvements widen the gap infinitely more.
Swift isn't a gaming API it's general purpose. If a developer wants to keep things portable they'll simply write as much OpenGL code as they can.
For a 10x improvement I'd code to metal if I were going to write in either ObjC or Swift.
For cross platform most indies will use something like Unity anyway.
Wait, what? How is putting Swift, C and Objective-C code in the same file going to work? Some sort of .swift{} tags around the code so that Xcode knows which bits are which language?
Same project. Not same file.
For cross platform most indies will use something like Unity anyway.
Cross platform developers will use Unity. Unity itself will use Metal. Everyone wins.
Cross platform developers will use Unity. Unity itself will use Metal. Everyone wins.
This. Cross-platform game engines are likely to be updated to use Metal.
Wow. That's a lot more 'big' announcements than I'd expected, honestly. Although I shouldn't have been surprised. I'm wondering what iOS 9 will do to 1-up these by the same amount that these surpass iOS 7's features.
Going to have to check out Swift. Just downloaded the iBook