Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Not knowing any programming languages, it is tempting to start with this.
It's generally much easier to start learning something intensely technical when that thing is new and at its simplest, and then grow and keep up with it as time goes on, rather than having to learn later on when it's had years of additions and exceptions piled on, which you also need to make sense of simultanously.

But I have no idea what I'm in for.
Is this the kind of thing a noob can learn on its own? Or should a person really learn some other languages first and then move into this?

Looking into the Apple dev program...

If you're looking to learn a language now, and it's your first one, I'd suggest learning just about any object-oriented language other than Swift right now. In six months or so, there will be much better books out to teach you Swift, but as it is today, the documentation is really intended for those with considerable experience. Get another language under your belt, so you understand a lot of the common logic involved with computer languages. You'll be much better prepared for Swift afterwards.
 
i'm gonna wait a bit before i get into it. not enough information on the internet yet.
 
The problem I have with investing a lot of time in Swift is that it's proprietary and therefore not multiplatform. While it's certainly possible to have a career developing for Apple products only, it's not where I'm coming from as a long time C++/Java/PHP/Javascript/etc lead developer working in areas where plaforms are sometimes but often not Apple-based, and not always in the control of the developer. So while I will play with it as an academic exercise, and it looks like an elegant language with many good features inspired by other languages, I'm not sure that if I were just starting out in programming as a career I would bet the farm on focussing on Swift rather than other more portable languages. In general, proprietary is not always a good thing in IT.

Really, Swift is no different from Objective-C. I think eventually Apple will open up Swift but for now it's proprietary because they're still tweaking it. But again, Objective-C, while not proprietary, is hardly used by a lot of non-Apple developers. Objective-C has still become massively popular based on the strength the iPhone and iPad markets. I've seen data that suggests it's the third most popular language right now (or at least, before Monday), beaten only by C and Java.
 
Seriously?

How can someone really call this something new and great? This looks like a stinking pile from the 80's, written to be compatible with a rather obscure C-dialect (which was created because Smalltalk was not fast enough.)

It brings nothing new to the table, and does not solve any issues which are not solved (better) already in other languages.

I mean, who are all these people saying it is amazing? Have they been in caves for the last 10 years? Is it so fscking hard to work in Xcode that this seems good? I don't know.

Seeing posters wanting this to replace XYZ at universities? I mean, are you crazy? There is nothing in Swift that would not be better taught in a proper cross-platform language.

Point out anything in this language that is revolutionary and has not been covered in any major language the last 10 years.
 
maybe my uni should pick this over java as i still have to pass that one ... uhm 7 semesters later sigh lol

I was thinking the same, if I'm lucky I'll get two lectures on Ruby as a comparison to Java.
 
How can someone really call this something new and great? This looks like a stinking pile from the 80's, written to be compatible with a rather obscure C-dialect (which was created because Smalltalk was not fast enough.)

It brings nothing new to the table, and does not solve any issues which are not solved (better) already in other languages.

I mean, who are all these people saying it is amazing? Have they been in caves for the last 10 years? Is it so fscking hard to work in Xcode that this seems good? I don't know.

Seeing posters wanting this to replace XYZ at universities? I mean, are you crazy? There is nothing in Swift that would not be better taught in a proper cross-platform language.

Point out anything in this language that is revolutionary and has not been covered in any major language the last 10 years.

I think it looks like a nice language with a lot of features that I happen to like. Sure, all of those features exist in some other language but that isn't particularly relevant. What's relevant is whether it is better than the alternative (Obj C).

As for being revolutionary and redefining how CS is taught etc. that is just Apple being Apple.
 
Last edited:
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?
 
How can someone really call this something new and great? This looks like a stinking pile from the 80's, written to be compatible with a rather obscure C-dialect (which was created because Smalltalk was not fast enough.)

It brings nothing new to the table, and does not solve any issues which are not solved (better) already in other languages.

I mean, who are all these people saying it is amazing? Have they been in caves for the last 10 years? Is it so fscking hard to work in Xcode that this seems good? I don't know.

Seeing posters wanting this to replace XYZ at universities? I mean, are you crazy? There is nothing in Swift that would not be better taught in a proper cross-platform language.

Point out anything in this language that is revolutionary and has not been covered in any major language the last 10 years.

Although I welcome Swift in the Apple dev platform, I agree. Also, look at the features that do NOT seem to be there, like for instance meta-programming. decorators, monky-patching (although YMMV), poly-inheritance, and generators.

To me, it looks more like a superset of C like Objective-C, aiming to be C++, with stripped away lower level management like memory and a tad more readable syntax (e.g., no semicolon). But that is exactly how they intended it, being compatible with Objective-C. Like some sort of Objective-C on steroids.

In some ways I even find it confusing, like "external parameters". Serious, Apple? Just call it keyword arguments, I wonder why they made it like this. The compiler should be able to handle x = callfunc(x = 10) vs callfunc(10).
 
The more I look at this, the more I may want to take the plunge and start developing again. Its been a while since I wrote apps. This seems like the learning curve is lower then objective c.
 
Really, Swift is no different from Objective-C. I think eventually Apple will open up Swift but for now it's proprietary because they're still tweaking it. But again, Objective-C, while not proprietary, is hardly used by a lot of non-Apple developers. Objective-C has still become massively popular based on the strength the iPhone and iPad markets. I've seen data that suggests it's the third most popular language right now (or at least, before Monday), beaten only by C and Java.
You're absolutely right of course, but we've avoided Objective-C as well up until now, for reasons of portability. Maintaining dual source on complex ongoing projects can be a nightmare. Swift doesn't alter that equation much, if at all. For OS X development, cross-platform toolkits like Qt work pretty well, and for a number of enterprise iOS apps, using HTML5/CSS/Javascript wrapped in Phonegap works fine, and again is cross-platform. It also has the advantage that the same code works without the Phonegap wrapper in any modern web browser, either for development or even deployment if the client doesn't want to install apps. You maybe wouldn't want to write high performance apps that way, but in many cases, it's fine. Swift isn't intended to address the reasons why you might not want to develop using Objective-C, it just offers a different, more modern take on it I guess.
 
I've read quite a bit of it. There's a lot lacking. Since when was a languages sum total documentation a single static PDF?

The_C_Programming_Language_1st_edition_cover.jpg
 
I love the switch statement syntax. Can use variables, expressions, tuples, ranges, wildcard symbols as cases, with optional extra criteria. That alone makes it quite powerful.

Like replacing:
Code:
if (x > box.left) && (x > box.right) && (y > box.top) && (y < box.bottom) && (z > box.front) && (z < box.back)
{
}

with:
Code:
switch(x,y,z)
{
    case (box.left...box.right, box.top...box.bottom,box.front...box.back):

}
 
swift-lang.org

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/

" The Swift parallel scripting language enables scientists, engineers, and data analysts to express and coordinate parallel invocations of application programs on distributed and parallel computing platforms: one of the dominant modes of performing computation in science and engineering.

Swift has been fruitfully employed in many diverse domains, including biochemistry, neuroscience, climate, earthquake simulation, hydrology, energy, economics, social network analysis, mass media analysis, materials science, and astronomy. It runs on a variety of platforms, and enables users to move their application scripts between them with relative ease. As personal computers become increasingly parallel, Swift enables users to leverage this parallel power with little or no experience in parallel programming."

"The Swift project is supported by the National Science Foundation with additional support from NIH, Argonne National Laboratory and the University of Chicago Computation Institute."
 
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

There's no connection between Swift and Swift other than the name and the fact they're both programming languages.
 
They should have called it iC, like "I see". It has i, it has C, and it oozes of intellectuality.
 
I love the switch statement syntax. Can use variables, expressions, tuples, ranges, wildcard symbols as cases, with optional extra criteria. That alone makes it quite powerful.

Like replacing:
Code:
if (x > box.left) && (x > box.right) && (y > box.top) && (y < box.bottom) && (z > box.front) && (z < box.back)
{
}

with:
Code:
switch(x,y,z)
{
    case (box.left...box.right, box.top...box.bottom,box.front...box.back):

}

Switch in Swift really is a godsend. The more I've seen of it, the happier I get. So many older languages do it in such an awful, inflexible way, not to mention unsafe.
 
Well it is feckin' lovely!

I wouldn't say it's revolutionary, it's just typical Apple - existing ideas done right.
 
How can someone really call this something new and great? This looks like a stinking pile from the 80's, written to be compatible with a rather obscure C-dialect (which was created because Smalltalk was not fast enough.)

It brings nothing new to the table, and does not solve any issues which are not solved (better) already in other languages.

I mean, who are all these people saying it is amazing? Have they been in caves for the last 10 years? Is it so fscking hard to work in Xcode that this seems good? I don't know.

Seeing posters wanting this to replace XYZ at universities? I mean, are you crazy? There is nothing in Swift that would not be better taught in a proper cross-platform language.

Point out anything in this language that is revolutionary and has not been covered in any major language the last 10 years.

Out of curiosity, which language would you recommend?

----------

Indeed. But using the same name as an existing language doesn't seem very smart, as it is (evidently) easily confused.

If that confuses you, you shouldn't try programming :D

----------

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/

Ok, some people _are_ easily confused.
 
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!

You mean like this?

twitter-icon.png
 
Is this the kind of thing a noob can learn on its own? Or should a person really learn some other languages first and then move into this?

Looking into the Apple dev program...

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.
 
Out of curiosity, which language would you recommend?

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.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.