Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Well, I guess Swift or Objective-C if you are going to do development for iOS/OS X?

I just don't see anything great or revolutionary ideas here. I have no idea why they needed 4 years for this. It is about as exciting as a Toyota. "Yes, ladies and gentlemen, here is the new Toyota Swift. It has 4 wheels, new switch statement syntax and can use existing roads. OMG!"


(As for me, I do C# and Java for a living, love Common Lisp, and has been paid to do Python in the past. And yes, all hardware I own is from Apple.)

It's probably not revolutionary, but it is a big step forward for those doing iOS / OSX. Like most new languages these days (and creating your own language seems to be all the fashion these days!) it seems to 'borrow' / collate a lot of the best features from other languages, and the syntax is a lot simpler, clearer and less verbose.
 
the visual part of me wishes that the white bird in the icon were flying upwards towards the top right corner instead downwards towards the bottom right corner. I guess I just have to deal with it!

Swifts hunt insects either in lateral flight or for their fastest maneuvers by diving at the insects. We live up mountain of a large (70 acre) marsh land built by beavers and we have livestock pastures over which I see a lot of swifts. They're very cool to watch.
 
Today's programmers have it easy.

We programmers from the 80s used to have to build linked lists from dirt and bits of string we found on the ground.

The programmers from the 70s had to punch their code out on cards and feed the cards into the machine.

Inferred variable types...pshaw.

You forgot about using paper tape and front panel switches back in the 60s.

But, on topic, Swift looks pretty appealing.
 
.....but the visual part of me wishes that the white bird in the icon were flying upwards towards the top right corner instead downwards towards the bottom right corner. I guess I just have to deal with it!

I had similar thoughts when I first saw it. It almost looks to be going down in flames—which I'm sure isn't what Apple had in mind!!

That's exactly what I thought as well! I'm glad I'm not the only one who had that impression!

I've yet to see a swift either crash or burn, so I didn't get either impression. On the other hand, if they'd called it Phoenix...

For what it's worth, I find the diving swift to be much more evocative than a climbing swift would be. Diving is when a swift is truly swift.

Choice of color? Hot colors evoke dynamism. If they'd gone for true coloration, the bird would have been gray/black, and the background sky blue. Ho hum!

And though I doubt it's at all intentional, swifts eat bugs.

Nice analysis.

Nahhh .... Here ya go:
Image

Yeah... maybe. It does say something that it looks good either way tho.

You mean like this?

Image

Lol!


It also has some Biblical historicity as far as imagery of the Holy Spirit descending as a dove. Apple delivering it's perfect language to it's people. Either way it's very well done all 'round.
 
Swift looks pretty cool, and I'm excited to start learning it at some point.....

.....but the visual part of me wishes that the white bird in the icon were flying upwards towards the top right corner instead downwards towards the bottom right corner. I guess I just have to deal with it!

Think of the bird as attacking a little mouse on the ground. Or perhaps about to snatch up the little Android Bot.
 
This looks really superb.

I've just had a go with the 'playground' that's part of the documentation. I can't wait to see what the 'real' documentation looks like given that code samples can be shown, edited and evaluated straight from inside the docs.

I've read a bit through the Using Cocoa with Swift docs and it looks like they've done a good job integrating the new language with the existing framework and runtime. All the usual ObjC stuff like Protocols and Delegates are right there and don't feel like they're tacked-on.

Gonna have a play now to see if I can port one of my old test apps to Swift!
 
You're mad because you had to download an ePub reader to read an ePub document.

Okay.



Because bolting on feature after feature to a language that was never designed to handle them will turn that language into an unwieldy mess. At some point, you need to throw it out and start from fresh.
Secondly, bolting on feature after feature would not fix the biggest fundamental problem with ObjectiveC: fresh developers and enterprises don't like it. It's old-fashioned and a little bit clunky.



Dunno, fifteen years maybe? Or shorter if there's a new breakthrough that makes development faster and safer. I wouldn't have it any other way, personally. And I wouldn't employ a developer who wasn't willing to learn new tools and techniques.



Okay, did you read the manual that it pained you so much to download?

Swift is a strongly-typed language that supports type inference. No one said it lacked data types.



Developers have been using type inference for years; it's nothing new or scary to most people. Why should I type

let name: String = "Hello world"

when I can tell just by looking at the line that name is a string:

let name = "Hello world"

Having said that, I tend to use it for strings, not numbers.



Then be happy; C will work the same forever – it's just that Apple has decided to move to something better for its up-and-coming developers.

The ObjectiveC market will wither as us old-timers retire and die off; I glad to see they've got a succession plan in place.
I started out my college career writing code in C++ and liked it but then I got my degree in finance thinking ohhh it's the responsible thing to do. Once I got a job at a start up as a front end developer I realized that I could use some more CS background and thought Java was the way to go. The problem is I hate the tools with Java so much so that it would actually make me not want to code with it at all. Of course that's all anyone was teaching at the time in the colleges. Fast forward several years and now I've been a front end developer for the NYT, TheLadders and Reuters over the last several years. Swift will be my foray back into more CS topics. Additionally, I will get to make some apps I've wanted to make for awhile even if I'm the only person who uses them.

Apple wants SWIFT to be a serious CS language. For that to happen, newbies and people at all levels need to actually use it. I am looking into new classes in NYC to beef up my CS knowledge. So far I've been watching the Clean Code videos and reviewing the SOLID principles.


----------

It also has some Biblical historicity as far as imagery of the Holy Spirit descending as a dove. Apple delivering it's perfect language to it's people. Either way it's very well done all 'round.
I am the APPLE FAITHFUL!
 
You forgot about using paper tape and front panel switches back in the 60s.

When I started we didn't even have paper tape and core memory. We had bunches of graduate students switching the classroom lights on and off in the engineering department.

// joke
 
Can anybody with more info than what the iBook provides tell if Swift redefines the way you interact with Cocoa in any way? I mean, will Swift kill Cocoa, or is Cocoa still a safe API to use?

Apple went out of their way to design a language that works as well with Cocoa (and other Objective-C API's) as Objective-C does. Some of the weirder language features, like external parameter names, exist solely to make Swift compatible with existing API's. The tools automatically convert Objective-C headers into compatible Swift classes so you can write or use any Objective-C API from Swift.

If anything, I would take Swift as a signal that Apple isn't planning to make any big changes in their APIs for a long time.
 
I think the question is not whether Swift is revolutionary or not, but is it a big improvement over Objective C and the previous set of tools? At first glance, it seems so to me. Objective C isn't bad, but it had enough cruft that it wasn't the most pleasant language. It was nice that they were tacking on features like anonymous functions/lambas, and they could have made more improvements to make things more pleasant, but sometimes starting from scratch is the way to go.

From my quick browse through the ebook, Swift looks nice enough. It's evolutionary in that it borrows from various other languages, and I'm glad many of these ideas are being pushed into what will be a mainstream language. That they are providing an interactive environment is just awesome. And this is just version 1, things can improve from here.

It seemed sad to me that Apple was miles ahead in their products, but Objective C was the language to use to develop for their platforms, while you have Microsoft with C# which has seen big improvements with every release. It's just nice to see that Apple cares enough about their development platform to make such big changes.

I've only used Objective C a small amount. At my job, I mostly do Java, with some C#, JavaScript, Python, and others. As a hobby, recently I played around with Scala, Clojure, Haskell. I was planning to revisit iOS development soon anyway, and Swift makes this even more exciting.
 
While I am excited to see a new high level language that makes coding projects faster and more intuitive, any would-be programmer should still start with the basics such as good old fashioned C if they want to build upon a stable foundation of knowledge.
 
Okay, so I've had a little play with Swift...

It feels weird in a cool way. It's strange how you reach a point where seeing the IDE switches your brain into the right 'mode' for the language.

If I open Visual Studio, my brain flicks to C#-mode.
If I open Sublime Text, my brain flicks to Python mode.
...and Xcode switches my brain to ObjC with all its square-brackety goodness.

So typing something that looks more like Python into Xcode feels verrry strange!

Anyway, code's definitely shorter. For example, the following are equivalent:

ObjC - Pre-ARC:
AVCaptureSession* session = [[AVCaptureSession alloc] init];

ObjC - Post-ARC:
AVCaptureSession* session = [AVCaptureSession init];

Swift:
var session = AVCaptureSession()

...that's pretty nice right there...
 
If you want to write software for MacOS X and iOS, yes. And no need to learn other languages first. This is a difference to Objective-C, where lots of developers have problems that would be trivial if they knew the C language. And it's not a very difficult language; there are lots of mysterious things going on in C that won't bother you in Swift.

Ehhhh. I just started reading the eBook and right from the start Apple is using terminology and concepts that are not explained at all, and a complete newbie to programming would have no understanding of. Even somebody with no prior knowledge of Objective-C specifically might need outside reference.

While it's probably possible to learn Swift as a first language, I would not recommend Apple's documentation to learn it with. Anyone looking to start learning their first language today would be well advised to start on something else instead, and learning Swift in six months or so when books are published by educators, not tech manual writers.
 
Have developers been waiting for this? When it was announced at WWDC, people seemed pretty happy about it

Sort of. Objective-C is showing its age and its limitations, especially as Apple has tried to add features to OS X. I don't think anyone was really expecting a new language this week, but it was a very welcome surprise.

It's not really exciting just because it's a new language, as exciting as that is, it's exciting because of what the language is actually like. Having started to actually dig into the eBook, there are a few things I'm not totally thrilled with, but my complaints are mainly stylistic. A lot of the features and syntax are wonderful, and there are definite improvements over Objective-C.
 
Coming from Java and Ruby I directly felt at home reading the Swift eBook. It seemed very familiar and complete. Never found the time to really get into Objective-C, so am glad to see Swift. Am looking forward to program with it.

Swift will be fairly useless for quite some time if you don't know objective-c as everything is written in it currently.
 
Let me look into that for you. Send me your invoice, receipt, credit card statement, and identification info.



Somehow "don't be lazy and google it" doesn't do a question like this justice.

Somehow you thought I was serious.
 
It seems that once again Apple's marketing department succeeded at telling people that Apple invented something that, in fact, was conceived by others and is based upon this tax-payer funded Open Source project:

http://swift-lang.org/main/

When once again hatred about certain things (hint: :apple:), combined with lack of knowledge start to impair judgement, it is maybe better to take a step back and do something else, instead of continuously bringing embarrassment over yourself.

:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.