Slashdot Mirror


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?

30 of 161 comments (clear)

  1. Pretty quickly by SuperKendall · · Score: 5, Interesting

    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
    1. Re:Pretty quickly by Darinbob · · Score: 5, Interesting

      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.

    2. Re:Pretty quickly by SuperKendall · · Score: 5, Informative

      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.

      --
      "There is more worth loving than we have strength to love." - Brian Jay Stanley
    3. Re:Pretty quickly by MightyMartian · · Score: 2, Insightful

      Except Mono sucks.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    4. Re:Pretty quickly by Darinbob · · Score: 3, Insightful

      These are open source of course (Objective-C is a part of GCC too). But practically speaking it will stick to being an Apple specific tool.

    5. Re:Pretty quickly by phantomfive · · Score: 2

      Objective-C comes free with GCC, so it basically runs on everything.

      Availability doesn't seem to matter....they're both mainly used on a small subset of devices, for a small subset of projects.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:Pretty quickly by jcr · · Score: 4, Funny

      Yeah, can't really avoid that when you set out to emulate a Microsoft product...

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    7. Re:Pretty quickly by DrXym · · Score: 2

      Except Mono sucks.

      The main reason Mono sucks is not the effort put into it, but the thought it was a good idea in the first place. While .NET is theoretically portable most real world .NET applications make assumptions about the platform they're running on, e.g. using MS SQL server adapters, or calling some native DLL or another, or Windows.Forms, or ASP.NET. So lots of .NET software simply will never run on Mono and even that which can might require significant changes - it's not write once, run anywhere or anywhere close to that. And of course Microsoft can lead the platform wherever they like and have demonstrated that all too often.

      That said, Mono has proven itself useful in one niche - the Unity toolkit uses the mono runtime as its scripting framework. It succeeds here because Unity is its own closed little world with its own APIs so it doesn't have to care about supporting some random assembly or esoteric feature.

  2. Huh? by grub · · Score: 5, Funny


    I just finished a Flash animation course at ITT. Am I too late to the game?

    --
    Trolling is a art,
    1. Re:Huh? by Austerity+Empowers · · Score: 2

      ITT Slashdot.

      He literally finished his course In This Thread.

  3. Which is better? by Locke2005 · · Score: 3, Interesting

    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.
    1. Re:Which is better? by Dog-Cow · · Score: 2

      There are zero Objective-C apps written today that use the garbage collector. ARC has been part of ObjC for years, and on iOS, the GC was never available. You've been trolled. Or the Anon Shitface is an ignorant asshole. Either way, your question is meaningless.

    2. Re:Which is better? by jeremyp · · Score: 2

      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 which is pretty good I think considering all the safety checking that Swift does that C does not do. A pure Objective-C version would not get close.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  4. How soon? by SensitiveMale · · Score: 4, Funny

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

    I'm guessing swiftly.

    1. Re:How soon? by fyngyrz · · Score: 4, Funny

      I'm guessing swiftly.

      I don't think you're being objective about this.

      --
      I've fallen off your lawn, and I can't get up.
  5. Dice spam by grimmjeeper · · Score: 5, Insightful

    Ah, yes. Dice "insights" stating the obvious long after everyone else figured it out.

    1. Re:Dice spam by fyngyrz · · Score: 2

      Sorry, five years experience required.

      --
      I've fallen off your lawn, and I can't get up.
  6. Consider all efficiencies by SuperKendall · · Score: 5, Interesting

    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
  7. what a sec by iggymanz · · Score: 4, Interesting

    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

    1. Re:what a sec by phantomfive · · Score: 3, Insightful

      Keep that in mind when you consider how accurate the Tiobe index is.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:what a sec by Nahor · · Score: 3, Funny

      More than that, looking at the graph, the trend for most of languages is down. So it looks like developers are fleeing to something else than programming.

  8. Re:More of an issue about how bad Objective-C is by Anonymous Coward · · Score: 5, Informative

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

  9. No, it really is about Swift being a good language by SuperKendall · · Score: 4, Informative

    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
  10. Re:More of an issue about how bad Objective-C is by Kjella · · Score: 4, Insightful

    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.

    --
    Live today, because you never know what tomorrow brings
  11. Re:More of an issue about how bad Objective-C is by metamatic · · Score: 3, Funny

    Let me know when I can actually download and build a Swift compiler on something other than OS X, and I'll take a look at the language. Until then I'm not interested. And I'm a Mac user.

    (On an unrelated note, who the fuck thought it was a good idea to use the Exit icon to indicate logging in to Slashdot?)

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  12. consider garbage collection is garbage by Anonymous Coward · · Score: 4, Funny

    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.

    1. Re:consider garbage collection is garbage by jcr · · Score: 2

      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

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    2. Re:consider garbage collection is garbage by abies · · Score: 2

      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?

  13. Re:Not proprietary by Anonymous Coward · · Score: 2, Insightful

    Anything that is produced solely by a corporation is proprietary, no matter if it is open source or not. Apple controls swift, just like Google controls Android and Microsoft controls C# and Sun controls Java.

  14. Re:Not proprietary by phantomfive · · Score: 4, Funny

    Sun controls Java.

    Hi there, Mr van Winkle!

    --
    "First they came for the slanderers and i said nothing."