Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
Compare cell phone plans using Wirefly's innovative plan comparison tool ×
Programming Iphone OS X Software Apple

Objective-C Use Falls Hard, Apple's Swift On the Rise (dice.com) 161

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?
This discussion has been archived. No new comments can be posted.

Objective-C Use Falls Hard, Apple's Swift On the Rise

Comments Filter:
  • Pretty quickly (Score:5, Interesting)

    by SuperKendall ( 25149 ) on Tuesday October 13, 2015 @05:43PM (#50721217)

    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.

    • Re:Pretty quickly (Score:5, Interesting)

      by Darinbob ( 1142669 ) on Tuesday October 13, 2015 @05:58PM (#50721395)

      Objective-C though seemed relegated to a very tiny number of systems. Not as tiny as C# of course. Overall a lot of things start feeling like the 1970s all over again, with each major player having their own language, so choice of favorite language coincides with choice of favorite system. I much prefer cross-system languages.

      • Re:Pretty quickly (Score:5, Informative)

        by SuperKendall ( 25149 ) on Tuesday October 13, 2015 @06:02PM (#50721449)

        Well, Swift should be cross-platform pretty shortly since they are releasing it as open source (including standard libraries) in a month or two.

        Objective-C was more cross-platform than you might think, people have used it for server development in the past. Even now it's used for both really popular desktop and mobile apps, which a decent range.

      • I much prefer cross-system languages.

        You can't even write Swift cross-system. Even though you may be writing an app for a phone, you are forced to do your dev work on a Mac (unless you want to resort to stupid solutions like renting a machine that you can remote desktop in just to write code [macincloud.com]).

        • You can't even write Swift cross-system. Even though you may be writing an app for a phone, you are forced to do your dev work on a Mac

          Since a Mac != a phone, you are BY DEFINITION already writing Swift cross-system.

        • I much prefer cross-system languages.

          You can't even write Swift cross-system. Even though you may be writing an app for a phone, you are forced to do your dev work on a Mac (unless you want to resort to stupid solutions like renting a machine that you can remote desktop in just to write code [macincloud.com]).

          What you call a "stupid" solution is actually a pretty good alternative to buying a Mac when you want to do part-time iOS development.

      • http://www.qb64.net/ [qb64.net] can write programs for Windows, Linux, Mac, and to some extent Android, but that got added last.
      • by AmiMoJo ( 196126 )

        C# is available on the vast majority of "desktop" operating systems, i.e. Windows. Okay, there is Mono, but C#'s real strength is in the vast number of .NET libraries and frameworks available, many of which are Windows only or not supported on Linux.

        While programmers like cross-platform languages, users hate them. They want native apps that look and act the same as other native apps on their platform of choice. Java was one of the worst examples of this, with Java apps using their own custom GUIs and being

    • At this point there's no reason not to do anything new in Objective-C, and port what you can when it makes sense.

      I really am not sure what you meant by that sentence.

      • by shoor ( 33382 )

        At this point there's no reason not to do anything new in Objective-C, and port what you can when it makes sense.

        I really am not sure what you meant by that sentence.

        Me neither. If you removed the word 'not', it would make sense, and maybe it's what the OP meant to write, but he or she got a little careless with the editing (can happen to anybody). But that's just a guess on my part.

      • After some thought I realized should have put "Swift" in where I put "Objective-C", hopefully that clarifies things. When I read it I just read it as Swift since that is what I meant...

        • Cool thx
        • by Wovel ( 964431 )

          That makes more sense, but is still wrong since there are already Swift implementations on other platforms. It is not as ubiquitous as Objective C, but it has not been around too long..

    • 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.

      My company does a lot of contracting work for other companies. So far the only client that has even asked us about Swift is Apple. It seems that Apple wants us to do everything in Swift now and everyone else prefers we stick to Objective-C. I can tell you the reason that I don't want to switch to Swift is that I think the syntax is horrific. My eyes want to bleed every time I look at something in Swift. I'll be honest, though, I don't really like Objective-C syntax either.

    • At this point there's no reason not to do anything new in Objective-C, and port what you can when it makes sense.

      Swift doesn't support interop with C++ code. Swift should not be used in third party closed source libraries due to linker conflicts (even according to Apple.)

      We're not at the point where everything should be Swift yet.

  • Huh? (Score:5, Funny)

    by grub ( 11606 ) <slashdot@grub.net> on Tuesday October 13, 2015 @05:44PM (#50721229) Homepage Journal

    I just finished a Flash animation course at ITT. Am I too late to the game?
  • Which is better? (Score:4, Interesting)

    by Locke2005 ( 849178 ) on Tuesday October 13, 2015 @05:44PM (#50721233)
    I'm not an iOS programmer, which generates more efficient executables?
    • by SuperKendall ( 25149 ) on Tuesday October 13, 2015 @05:51PM (#50721325)

      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.

      • by Anonymous Coward on Tuesday October 13, 2015 @08:00PM (#50722317)

        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.

        • by jcr ( 53032 )

          When you don't know what you're talking about, it's best to stay anonymous.

          Apple's ARC memory management doesn't stop and run collection sweeps. This isn't an early 1980s LISP we're talking about.

          -jcr

          • by Anonymous Coward

            True. But there are still cases where you can get high latency. The worst case latency for ARC is still as bad a mark&sweep GC. For example, add a few thousand objects to a table and then release the table; the program will iterate over all those thousands of objects, decrementing the reference counts and possibly releasing those resources.

            Ironically this is one area where modern mark&sweep algorithms can be better, especially if the table was temporary or short-lived. And in C you can often use obj

            • by abies ( 607076 )

              For example, add a few thousand objects to a table and then release the table; the program will iterate over all those thousands of objects, decrementing the reference counts and possibly releasing those resources.

              And how this differs from C++? Not talking about reference counting, as it depends on what kind of pointers you are using, but about having cascading destruction happening if you get rid of high level container?

            • by jeremyp ( 130771 )

              And in C you can often use object stacks/bump allocators for this stuff. (Which is one reason to roll-your-own data structures in C rather than use libraries--you can optimize all the properties of the data structure for _your_ particular case.

              Yes, how did that work out for the openssl guys?

          • This isn't an early 1980s LISP we're talking about.

            Unfortunately, because early 1980s LISP systems were much more evolved than what Apple has ever come up with. :(

        • Like being interrupted by an other process? Probably swapped out to disk?

          And most important: Swift is not a GC language/platform, a mistake imho.

          • by jeremyp ( 130771 )

            The Apple implementation of Swift isn't garbage collected. Once it's made open source, there is no reason why somebody else can't create a GC version.

    • by jeremyp ( 130771 )

      Swift.

      By default Swift objects do not have dynamic dispatch, so method invocations do not have to do the lookup that Objective-C does. However, if you are interacting heavily with Cocoa or Foundation which any UI application has to do, you lose that advantage. There's still some advantage because Swift's optimisation is better than with Clang.

      I wrote a 6502 emulation in C and Objective-C once in which all the performance critical stuff was done in pure C. My port into Swift ran at about a third of the speed

      • by Dog-Cow ( 21281 )

        How could you possibly have any performance-critical code running a 6502 emulator on modern hardware?

  • How soon? (Score:5, Funny)

    by SensitiveMale ( 155605 ) on Tuesday October 13, 2015 @05:46PM (#50721257)

    "How soon until Swift eclipses Objective-C entirely?"

    I'm guessing swiftly.

  • Dice spam (Score:5, Insightful)

    by grimmjeeper ( 2301232 ) on Tuesday October 13, 2015 @05:46PM (#50721265) Homepage
    Ah, yes. Dice "insights" stating the obvious long after everyone else figured it out.
  • by Anonymous Coward

    sad

  • But you sill need five years of experience to get called in for a job interview.
  • by Anonymous Coward

    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 la

    • by Anonymous Coward on Tuesday October 13, 2015 @06:32PM (#50721705)

      You realise that Apple already announced that the Swift compiler is going to be ported to linux and made open source, right?

    • by SuperKendall ( 25149 ) on Tuesday October 13, 2015 @06:46PM (#50721817)

      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.

      • 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.
      • 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.

      • 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? ;)

      • Objective-C is actually a very good language.

        FTFY

    • by Kjella ( 173770 ) on Tuesday October 13, 2015 @07:34PM (#50722131) Homepage

      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.

      It's less niche than at least two dozen programming languages /. has hyped as the best thing since sliced bread. Sometimes I feel this place has become a bunch of grumpy old farts who think C and POSIX was the pinnacle of computer science and everything since has just been poorly reinventing the wheel. Or that programming should be for real men who could hand code it in assembly and that high level languages is just another attempt to recreate COBOL or Visual Basic. There's not a whole lot of money in creating programming languages, just ask Sun. And if you don't have widespread adoption, you're never getting off the ground. That's why the OSS community is still trying to create UI apps using 1980s tech, sure Qt is a decent band aid and GTK.... well it's a band aid, but the base language is way behind Java, C# and Swift. Not in what you can theoretically do, but in terms of how easy it is to do it.

      Besides, Microsoft is open sourcing .NET Core, Apple has promised to open source Swift within the end of the year, Java has of course been open a while with the OpenJDK so it seems like the days of the base language being closed source is coming to an end. Of course they all do it with their own platform in mind, but desktop Linux could use a few allies. Yes, GNOME and KDE has been at it for a very long time but have they managed to get any market share? Once a percent of nerds, nobody else.

    • Pretty much. Swift seems to be a good language, but largely unremarkable. I doubt it would have much of a chance of significant adoption if Objective-C wasn't so terrible.
  • what a sec (Score:5, Interesting)

    by iggymanz ( 596061 ) on Tuesday October 13, 2015 @06:06PM (#50721491)

    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

  • by Anonymous Coward

    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 handl

  • 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 i

  • 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

  • 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
       

  • Of course Swift is cannibalizing Objective-C. Apple intended it to.

    • Obi-c fell 11, swift went up 4.
      There's more than cannibalization going on here.

      • Objective-C loosely followed C, OK, I could work with it. Swift is still obviously maturing. Is Apple menopausal?
      • Obj-C fell 11, swift went up 4.

        It's not actually relevant how many ranking indexes it fell by. You can't go by that. What's relevant is the percentages.

        Objective-C went from 10.294% to 1.419%.
        Swift went from 1.054% to 1.277%.
        Combined, they went from 11.349% to 2.696%.

        Clearly, the method of calculating percentages is highly flawed, as iOS and OS X development has not dropped as much as we are (mis)led to believe here.

  • 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 Stackove

  • 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 mogene

Time is nature's way of making sure that everything doesn't happen at once. Space is nature's way of making sure that everything doesn't happen to you.

Working...