r/ObjectiveC • u/LisaDziuba • Feb 16 '17
Could Objective-C be the future of coding for Apple?
http://lapcatsoftware.com/articles/whither-swift.html
10
Upvotes
r/ObjectiveC • u/LisaDziuba • Feb 16 '17
8
u/mantrap2 Feb 16 '17
We're still using ObjC because Swift is still to unstable and under-powered for many things. We do a lot of integration with C/C++ code, numerical code with Accelerate and legacy apps so ObjC with its C-roots still is easier. Having Swift change (which it has) mid-project is not an option.
I understand where they are going with Swift and why but there's a ways to go before that goal delivers. In the mean time a generation is being switched over to aligns with those goals. The magic phrase: functional programming. Obviously Swift isn't quite that yet but that's where it's going (and it's needed for the "end of Moore's Law" options).
In the long term C-based languages are NOT the future because of how they fail to deal well with typing and multitasking which are the critical future. But for the next 10-20 years, they will remain. Yes, this includes C, C++, ObjC, Python, Java, etc. none of these has a bright future in the 20-year time scale - at least no better than COBOL has today.
2
u/petermolnar_hu Feb 16 '17
It was an interesting read, thanks for sharing it. Personally I don't consider Swift to be the only used language for bigger projects yet. It is not mature yet. Based on the this interview with Chris Lattner: http://atp.fm/episodes/205 I think that is still true. I think since Swift is open source now, there is no need Apple to put behind big efforts to have own team if they want to axe it, and it might be still viable. I can feel the hype as well, and I have just started to learn Swift, since I didn't want to dive into the problems come from the half-bakedness. Either way, I think it will be a very interesting experience to see if it can evolve and be mature enough to work as a system language.
16
u/mariox19 Feb 17 '17
We're using Objective-C where I work because, number one, we have a big codebase written in it and, number two, because we've already learned Objective-C, and, on account of that, don't find it scary or even off-putting.
People coming to iOS/macOS development catch sight of the square brackets and panic. In some ways I think this was a decent chunk of the reason that Apple created Swift. I'm not saying Swift is a bad language; and, in fact, it has a lot of modern ideas and conventions going for it. But Objective-C is a fine language.
12
u/mooglinux Feb 16 '17
What everyone keeps missing is that Swift isn't competing with Objective C, it is competing with C# and .NET. Microsoft is investing heavily in .NET for everything, including for iOS/macOS app development! It isn't about being superior, but about attracting developers to develop applications for their platform. Objective C has failed to gain any traction outside of app development, and with Microsoft's acquisition of Xamarin then Objective C does not even have a monopoly on that.
Swift is nowhere near as good and mature as C# right now. But Apple will not ditch Swift because it is an important strategic asset in competing for developer mindshare.
0
u/w0mba7 Feb 16 '17
Often Apple comes out with great new technologies at WWDC, but sometimes they proudly announce a half-baked stinker like OpenDoc, Quickdraw GX, Quickdraw 3D, Newton, Dylan, Obj C Garbage Collection, etc. Sometimes the bad idea is gone by the next WWDC, sometimes these projects limp on for another year or two. Anybody who took the risk of adopting the stinker is out of luck, maybe out of business, depending on their level of committment.
I have a pretty good track record of spotting the bad ones, and Swift has always smelled bad to me. It's half-baked, it's awkward, it's constantly changing syntax for no good reason. I broke my own rule of steering clear of the bad stuff and wrote an app in it, and everything was more work than it would have been in Obj C. I'm going to keep my Swift up to date just for resumé reasons, but I still don't believe in Swift and I still half-expect Apple to drop it at WWDC 2017 (or 2018).