Hacker News new | ask | show | jobs
by iOSGuy 3183 days ago
Swift is great for a small app, with a handful of developers. For a platform, which interops with multiple languages, being worked on by a large team of engineers, switching to Swift would just be silly.

Oh yeah, let me increase my compile times, the size of my SDK, add complications for my publishers, see zero performance benefit, build a ton of scaffolding code, add yearly tech debt until Swift is actually a mature stable language. Terrible idea!

It might be the gold standard some day, but for now it's just a kid compared to ObjC, and everything that comes with being a C based language. If you're learning to make apps, by all means, you should learn Swift, but it will be quite a long time before ObjC is dead and gone, so be prepared to learn both young padawan.

Not to mention, the hype train/bandwagon is really muddying the waters. It's probably a bad idea to take advice on how performant/powerful Swift is from a Zealot, or someone that's betting everything on it.

3 comments

A larger team benefits more from the ability to write higher quality code with Swift. Fewer or no crashes is s better customer benefit than some hypothetical minor performance benefit. The toolchain does suck though, if Apple (or done one else) fixes the toolchain Objective C is done as a viable language.
Not sure about that. The same has been said (many times) about Java vs. C and C++. All three keep chugging along quite nicely...
From one perspective, this just means that the market for software quality is not very tight and that our industry is not empirical in assessing it.
What it really means is that the market for software language is being exploited and usurped in order to maintain developer mindshare. The only really good reason to learn Swift is "because everyone else is learning it".
The most important, and sufficient, reason to learn Swift - or anything else, for that matter - is curiosity. I don't like working with people who are not curious about their craft.
Its really unnecessary to learn Swift -there are a plethora of other, better ways to build apps.

But if you want to keep up with the joneses - while delivering Apple a perfect 'big stick' to keep developer mindshare locked into their platforms - Swift is a pretty sweet deal .. for Apple.

Swift is the best way to develop IOS apps, that’s a pretty good reason.
I'm not so concerned about "yearly debt" anymore. Swift 2->3 was baaaad, but Swift 3->4 was painless. I don't expect it will be worse next year.
As a newcomer to Swift, finding "old" blog posts and tutorials that are written in Swift 2 is utterly maddening.
I always set a filter in my Swift google search so I only get recent content. It generally weeds out a lot of old Swift code/tutorials.
Try finding new blog posts in Objective C. Most are in Swift.
At least one can tell those two apart. To someone learning the language, Swift 2 and 3 are almost indistinguishable.

Lots of fun compiler errors and deprecation warnings were had.

You can run them through the Xcode converter. I made a list of the code that I converted. It’s really not that hard to deal with small examples:

https://h4labs.wordpress.com/2016/09/17/my-ios-10-and-swift-...

Yeah but at least the old ObjC ones are still relevant. And there are a lot of them.
The are lots of new API’s and some old code has been deprecated. There haven’t been many Objective C tutorials or books in 3 years.
Well. If you just want to confirm the order you should be calling methods, you should be able to figure out how to use any of those APIs based on Swift examples.

If anything, Swift examples are more necessary because there's tricky things you can do with closures, manp, flatMap, etc.

ObjC is very straightforward.

How did you work around Obj-C inference issues when migrating to Swift 4?
I find it it strange that you complains seem to be about tooling, yet you start the comment as if Swift - the language - is the problem.

In my experience, Swift has been great, I vastly prefer it to ObjC. What I don't prefer is SourceKit constantly crashing on me for example, but I wouldn't attribute that to Swift.