Apple has introduced a brand new programming language alongside a brand new version of Xcode.
Swift is a big deal for developers. The language includes loads of features third-party developers have been asking for. It sits alongside Objective-C and C, meaning developers can interchange between languages in the same project.
Swift includes type inference, generics and multiple return types and much much more. Swift will enable Apple developers to create new games without worrying about Objective-C cruft that has built up over the last decade.
The new language integrates with a new development feature of Xcode, called ‘Playgrounds’. Playgrounds is a testing ground that renders developer code in realtime. Developers can jump in and out of game time, for example, whilst typing.
Apple claims Swift brings all of these new realtime development features without bearing any additional cost. In many ways, Swift acts like a modern JavaScript language but runs natively on the device. Developers can start submitting apps written in Swift from day 1 of iOS 8’s and Yosemite’s public release.
FTC: We use income earning auto affiliate links.More.
I wonder what the parrallels to http://swift-lang.org/ are. Even the logo looks quite alike
It isn’t available anymore. Coincidence? I think not.
It’s a coincidence (the name). It’s not a coincidence the server fault: after the keynote the world is coming there. Its a parallel framework used by scientist in general, and bioinformaticians like me, in particular.
I don’t know if I should be thrilled or pissed. I am a teenage developer who has been learning objective-C for a month (well I tried a few month before and gave up and picked it up after the last exam). And I borrowed a few books to learn about it and paid a online course to learn Objective-C. Now apple is releasing a new language. I was like ..seriously..? I just learnt a part of it and there is a new one???????????
Objective-C isn’t going anywhere, you don’t need Swift if you don’t want it.
Well it isn’t like Objective-C will become obsolete. On top of that, as a programmer myself i can tell you: You will never learn a programming language for nothing ;).
Objective-C was obsolete 10 years ago! It was just your only option for iOS development till now.
Anyway, the high-schooler should definitely be learning Swift, IMO: investing heavily in a programming language based on C is probably not the best move for the future.
That said, I’m sure the iOS APIs are identical between Objective-C and Swift even if the language is newer, so the time spent learning Objective-C/iPhone development won’t be totally wasted (and a month isn’t a lot of time lost anyway).
Did you watch the keynote? Swift is “Objective-C without the C”. It builds on O-C principles without the archaic C language underpinnings.
There’s a book in the iBooks Store regarding it. Check it out.
Welcome to your life as a software developer….
Amen!
Be happy. Swift if for your generation. We geezers toggled switches on consoles. Now you young whipper snappers can fly ….
I am in a similar situation however, objective-c is still supported alongside swift and knowledge of objective-c seems necessary to use swift… so many it wasn’t a waste of time after all!
You will be OK. They say Swift is Objective-C without the C part.
I was getting pissed too, then it seems we are still going in the same path. Besides, you can still use Objective-C in XCode together with Swift; a good way to become more familiar with it.
hey mate, there is an upside for us. At least there will be no job title like “programmer with swift 10 years + experience” HAHAHAHA
Don’t piss on yourself too much, whiny baby.
Don’t worry Untitled_007, there will be. Within a year Indians will catch up and include ten years of experience with Swift. They always do.
You’ll be better off getting in on Swift from day 1. It will put you on a more level playing field in a way. Blessing in disguise, maybe?
You can still write your apps in objective-c but now there is even more you can do. Just write some objective-c code and if you have the time check out if it can be done more efficient or convenient in Swift.
Quit whining, if you don’t like to learn new things, perhaps coding is not your thing, loser.
Dude please,
The world has to go forward, it’s not gonna wait for you.
It’s never a bad thing to learn new stuff. Some say a good developer learns at least one new programming language per year and I think that might be a little bit low. And if you are already familiar with JS, Ruby or Haskell you will feel quite familiar with many aspects of Swift
If you plan on being a developer get used to it. It’s extremely rare for a good programmer to know only one language.
Honestly, if you’re going to be a software dev, learning a new language will be common. Learning new libraries is what’s burns most of your time.
Welcome to real life!
In the grand scheme of things, one month is nothing. But the really important things you have learned or will learn from Objective-C (or any object-oriented language) are the underlying concepts. You will find that the syntax of any particular language is usually the quickest thing you will pick up. The fundamental concepts of programming are what are really important.
I’m so happy to see this. Could never get into Objective-C. This Bracket in Bracket in Bracket thing drove me crazy. But i will give Swift a chance :)
I know other people who felt this way, but frankly, I don’t understand why this was so hard for people to grasp, compared to thing arrow thing arrow thing arrow thing. I mean, it’s the same problem just different syntax. I could see it as being a problem if you decided to do development without using the XCode IDE, for example, but seriously that’s the only real problem with it.
Once I figured it out, I have no problem going between this mechanism for object element finding and C++/PHP/Perl/etc. It’s just a different way of saying the same thing.
But, hey, the only constant is change. Perhaps it was time.
I’m excited, it looks way easier than Objective C and Cocoa.
Looks like this Forth development system, first released in 1997 (and trademarked): http://www.forth.com/swiftforth/
Yea where is it in iBooks? Maybe I’m not searching for the right keywords???
can’t find the book in iStore…anyone know the link?
I think this is an important step forward for Apple and you should be excited. Here is a link to the book from the dev portal. Enjoy!!
https://itunes.apple.com/us/book/swift-programming-language/id881256329?mt=11
I personally don’t get it. The thing i *liked* about Objective-C was that it was “C”. I have written apps that use SQLite, and I could just link right into it. No need for learning some new framework that was SQLite for some new language. C#, for example, requires you use a C# inspired SQlite. Documentation was not as easily available for the C# version as it is for the ubiquitous C version.
In the grand scheme of things, I don’t really use older, native C libraries, but the idea that I could just plop in C-code whenever I wanted and C libraries whenever i wanted was great to me.
I simply have no idea why this would be “better”.
But, I guess if you are a 20 year old now who started programming 5 years ago using some of the new scripting languages, this makes sense. As much as I would like to think that “real programmers should learn C”, I dont’ want to sound like the luddites who still are mad at compilers because everybody should be coding in assembly language.
“The only constant is change”, right?
It sounds like you’ll be able to continue using Obj-C and C alongside Swift. So best of both worlds, it sounds like.
Yeah, that’s what I need to figure out. I don’t quite see how I can mix and match C-code in the same source code file as swift as they are so different. It “looks” like the C-code would have to be isolated into its own “.h/.cpp”.
If i can mix and match the way I could mix and match Objective-C 1.0 and 2.0, great – I can still do things the way I used to, but now slowly start taking advantage of “@syntheize” for example.
Time will tell.
God let’s hope the debacle that is Objective-C has numbered days.
That’s a religious statement. The facts say otherwise. Lots of incredible apps have been written using Objective-C. I mean, if it was all about the languages, shouldn’t everybody have moved to Android apps by now? I mean, Java is “so much better” of a way of doing things over that idiotic “C” and its derivatives, right?
Wrong.
The language was fine. It took some initial getting used to, but once you figure it out, it is actually quite clean and nice. Especially if you compare it to some of the monstrosities added to C++, like templates.
The language syntax is but one of many issues with doing development. And I dont’ think it’s been some boat anchor keeping people from writing apps… it isn’t like people were “I just want to write a cool app, but Objective-C is so hard and unwieldly”.
What’s the best way to learn a new language like Swift? I only currently do web programming (in my spare time) – HTML/CSS and a bit of javascript, but I want to venture into app development for iPhone/iPad and so learning Swift would seem like a good way to go.
Learn the underlying principles of OOP. Once you understand the underlying fundamentals of OOP, you can learn any OOP language (and their quirks).
Im not a developer so pardon my ignorance, but will swift do anything for people that write apps for iOS and android. As far as can people use swift to write android apps? if not will this be a game changer as far as less people writing android apps?