Objective-C Use Falls Hard, Apple's Swift On the Rise (dice.com)
Nerval's Lobster writes: When Apple rolled out Swift last summer, it expected its new programming language to eventually replace Objective-C, which developers have used for years to build iOS and Mac OS X apps. Thanks to Apple's huge developer ecosystem (and equally massive footprint in the world of consumer devices), Swift quickly became one of the most buzzed-about programming languages, as cited by sites such as Stack Overflow. And now, according to new data from TIOBE Software, which keeps a regularly updated index of popular programming languages, Swift might be seriously cannibalizing Objective-C. On TIOBE's latest index, Objective-C is ranked fourteenth among programming languages, a considerable drop from its third-place spot in October 2014. Swift managed to climb from nineteenth to fifteenth during the same period. "Soon after Apple announced to switch from Objective-C to Swift, Objective-C went into free fall," read TIOBE's text accompanying the data. "This month Objective-C dropped out of the TIOBE index top 10." How soon until Swift eclipses Objective-C entirely?
Apple has done great job of interoperability with Objective-C, making it pretty easy to write new code or port small portions of an existing program...
They've even gone so far as to add improvements to Objective-C which are nice, but whose primary reason for existing is that Objective-C code is even easier (and better typed) when accessed from Swift.
At this point there's no reason not to do anything new in Objective-C, and port what you can when it makes sense.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
I just finished a Flash animation course at ITT. Am I too late to the game?
Trolling is a art,
I'm not an iOS programmer, which generates more efficient executables?
I've abandoned my search for truth; now I'm just looking for some useful delusions.
"How soon until Swift eclipses Objective-C entirely?"
I'm guessing swiftly.
Ah, yes. Dice "insights" stating the obvious long after everyone else figured it out.
sad
But you sill need five years of experience to get called in for a job interview.
At this point the executables are about the same speed between Objective-C and Swift. In reality since anything even remotely heavy you'd be doing will probably use some library or frameworks like Accelerate it hardly matters.
What does matter though is programmer efficiency, and Swift is pretty useful there. It eliminates a lot of boilerplate or repetitive code, which makes for cleaner looking code all around that is easier to maintain and understand what you were trying to do later.
Lots of Swift educational materials have done a good job of keeping up with Swift but be aware it's still changing - make sure anything you look into covers at least Swift2.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
as much as I hate to admit it,
Congrats Apple, Good job..
Whichever is more popular, they are mostly to write software for iOS. Apple is the clear winner.
...than about how good Swift is. Swift is an improvement over Objective-C, but that isn't saying much, and quick adoption also says more about developers fears that Apple will deprecate Objective-C from new iterations of its X-Code and force everybody to use Swift moving forward to new Apple Operating Systems.
The world didn't need more languages. Developers write millions of lines of code for open-source libraries in multi-platform languages, and Apple and Google get into a dick-waving contest with these languages that add little, if anything, to their corner of the programming world.
I'm not sure what the right answer is, but it won't be found in a niche language whose sole purpose is to support one company's ecosystem and lock in developers to their platforms.
objective c plummets but swift only crawls up a couple notches but is still way down the list. sounds more like a lot of Apple device developers fled to something else for a living
I've been using swift for a while now, overall the language is nice and is easier than objective-c.
But, there are issues.
* You still have to know ObjectiveC. Similar to other systems, like JavaScript. You can learn other languages that compile to Javascript all you want, but you should still learn JavaScript.
* Swift gets lost. You ask Swift to call func1, it calls func2. The fix is to do a Clean and recompile.
* Debugger gets lost and reverts to assembly -- as if ObjectiveC wasn't bad enough
* Error handling is still Janky as shit! You can't catch exceptions on functionality that isn't marked to throw exceptions (compiler error), so if one does come about you are 'effed and app crashes.
* Generics are not really implemented. At least not in a way that you would expect if you came from...I don't know, any other language on earth.
Swift is shortly to be released as open source, including the standard library (fixing something that kept GnuStep behind).
"There is more worth loving than we have strength to love." - Brian Jay Stanley
It is now official. Netcraft has confirmed: Objective-C is dying
One more crippling bombshell hit the already beleaguered Objective-C community when IDC confirmed that Objective-C market share has dropped yet again, now down to less than a fraction of 1 percent of all developers. Coming on the heels of a recent Netcraft survey which plainly states that Objective-C has lost more market share, this news serves to reinforce what we've known all along. Objective-C is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Trendy Code Languages comprehensive networking test.
You don't need to be the Amazing Kreskin to predict Objective-C's future. The hand writing is on the wall: Objective-C faces a bleak future. In fact there won't be any future at all for Objective-C because Objective-C is dying. Things are looking very bad for Objective-C. As many of us are already aware, Objective-C continues to lose market share. Red ink flows like a river of blood.
Objective-C++++ is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time Objective-C developers Joe Whathisname Hubbard and Mike Theotherguy only serve to underscore the point more clearly. There can no longer be any doubt: Objective-C is dying.
Let's keep to the facts and look at the numbers.
Due to the troubles of Cupertino, abysmal sales and so on, Objective-C went out of business and was taken over by Apple who sell another troubled OS. Now Objective-C is dead, its corpse turned over to yet another charnel house.
All major surveys show that Objective-C has steadily declined in market share. Objective-C is very sick and its long term survival prospects are very dim. If Objective-C is to survive at all it will be among dilettante code dabblers. Objective-C continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, Objective-C is dead.
Just cruising through this digital world at 33 1/3 rpm...
Objective-C was actually a very good language. Having used a lot of other languages heavily, including Java and C++ and C and Scheme and Lisp, Objective-C had a lot of great things going for it - it was verbose but once you got used to it that was nice, and the standard libraries for it were very powerful.
Swift itself is I think a really great overall language. It's pragmatic in all kinds of ways that tries to help the programmer, letting you forgo a lot of syntactical cruft. It also offers a nice array of modern programing concepts including functional programming - but does not force you to use them, so you can decide what level of functional and object oriented programing is the right mix for you - or heck, just write only functions and use it like a much nicer C variant.
The great thing is also, that with Apple heavily backing it you don't have to worry if it's worth picking up unlike lots of other nice, but small and not widely used languages.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Objective-C was a single-platform language, with a single vendor and a single compiler*. Now that the only vendor switch to something else, developers move along. Nobody ever wanted to develop in Objective-C. People developed in Objective-C because it was the language of iOS.
*Yes, I know, GCC also supports Objective-C and 2 Linux users used it in their basement
Apple is releasing Swift to open source, and is going to provide the language to Linux, so only windows will need to be ported off the open source code.
Let me know when they catch up with c.
Oh, wait. They never will. Because garbage collection. There's nothing so ultimately fabulous as the executable deciding to take a nice vacation in the middle of something you didn't want it to.
So never mind.
LLVM :)
I've fallen off your lawn, and I can't get up.
This is the correct response. Swift is good because it makes it easy for the programmer to provide lots of type information to the compiler. Obj-C was/is also good, and has picked up all of these recent improvements, just with more verbosity.
http://www.qb64.net/ can write programs for Windows, Linux, Mac, and to some extent Android, but that got added last.
The great thing is also, that with Apple heavily backing it you don't have to worry if it's worth picking up unlike lots of other nice, but small and not widely used languages.
Unless you end up working for a project whose target platform is anything but Apple. Your chances of encountering Swift on a program targeting any other platform is close to nil.
I think we're all missing the most important revelation from the index: ASSEMBLY language is currently more popular than Objective-C, Swift, and Visual Basic. Currently ranked 12th over-all, up from 31st this time last year
Good code shouldn't be checking for NULL pointers much at all, especially if your code follows good hygiene. I code mostly in C, but try to religiously follow RAII pattern by C++ religiously. If you follow an RAII pattern, there should be few if any execution paths where a NULL pointer could be dereferenced. (Note to C++ people: RAII is so much more than automated destructors on function exit. That's like the least interesting aspect of the pattern. It's just as powerful in C as in C++.)
Ever wonder why free() accepts a NULL pointer? I can't say for sure, but it sure makes bailing out of a constructor function because of an OOM or other intermediate error infinitely easier to code. All of my destructor functions always accept a NULL pointer, and it's pretty much the only place I need to check for a NULL pointer.
Another trick to avoid NULL pointers that is occasionally useful is to use a singleton in-place of NULL. That way it can be accessed freely.
Plus, conditionals are pipeline killers. The fewer conditionals in your code, the better. It's perhaps not a coincidence that well-designed code will tend to minimize conditionals by minimizing the number of possible program states.
Using unsigned integers where possible is another example. You don't need to check for underflow, just overflow.
And well-thought-out algorithms might not even need to check for overflow at all. Garbage-in is garbage-out. As long as use of the value doesn't cause trouble elsewhere in the program (like an out-of-bounds array index), I don't see why a program should report an error rather than return the garbage value to the caller.
Along the same lines, I rarely if ever do input sanitizing. It's usually stupid. A bad PHP programmer, for example, will use htmlentities to escape a string, then pass it to system or popen. A smart programmer will use fork+exec directly, bypassing the shell completely, making htmlentities or other sanity checking completely unnecessary. Sanity checking is usually just a form of blacklisting, anyhow, which is not exactly the best way to write correct and secure software.
Of course Swift is cannibalizing Objective-C. Apple intended it to.
The great thing is also, that with Apple heavily backing it you don't have to worry if it's worth picking up
Didn't you say the same about Objective-C a few years ago? ;)
----------------------------------- My Other Sig Is Hilarious -----------------------------------
ignoring try/catch/finally? So Apple thinks there are no unknowns during development? How simplistic.
Even though it's pretty clear that Swift is indeed replacing Objective-C which was its, err, objective), who still gives any credit to the infamous TIOBE index?
It is possible that app development is slowing down. The gold rush is over. Objective-C has dropped 8.6% and Swift climbs a meagre 0.5%. Additionally there is a resurgence of hybrid app development solutions like Xamarin (which uses C#) and PhoneGap/Ionic (javascript). These two factors combined account for some of the 8% overall drop.
Overall though, I have never trusted the Tiobe index. Perl is still in the top 10? Ok. No. On any measure. Compared to the clear activity of Python vs Perl (10x) on Stackoverflow, it is very clearly wrong. As a former Perl/CPAN contributor it is sad to browse CPAN. It is akin to walking through the once mighty mines of moria. Astonishingly detailed and yet for the most part abandoned.
For the last four projects, we've been using Swift exclusively. I really like it. The syntax feels modern to me (subjective, I agree).
The compiler however still needs a lot of work. I feel it's quite slow. It's somewhat better where it won't recompile related files when you make one change. But I was used to the Objective-C compiler. That thing _flies_. On a MacBook Air, three years old, I am able to work on pretty big Objective-C projects.
For Swift, that's simply not an option. Especially if you use mogenerator and Core Data (for those not in the know, it's a object layer on top of an SQLite database, and mogenerator generates two class files for every table), our last project ran into about 200 class files. Compiling took minutes.
Things have gotten better. Especially if you're able to put parts of your projects in modules, it's really much better. But still I feel the Swift compiler requires a speedy quad core CPU. If you can afford it, get whatever top of the line quad core Apple offers.
8 of 13 people found this answer helpful. Did you?
Objective-C is actually a very good language.
FTFY