back to article Favored Swift hits the charts: Now in top 10 programming languages

In March, the Swift programming language rose to became the 10th most popular, at least by the measure of TIOBE Software. Open-sourced by Apple in 2015, Swift has been touted as an appealing alternative to better-established programming languages because of its safety, speed, and approachable syntax. It combines modern …

  1. thames

    A bit of perspective.

    Swift is still behind Delphi/Object Pascal, which should put some perspective on how widespread it really is. It's only marginally ahead of Perl.

    I haven't seen any sign that Swift will see significant use outside of the Apple market. If Google decides to deprecate use of Java on Android (perhaps because Oracle is being such a pain), then they are more likely to go for something they control, such as Dart or a derivative of it.

    1. Ken Hagan Gold badge

      Re: A bit of perspective.

      "It's only marginally ahead of Perl."

      Whaaat!? It's a STONKING 0.007% ahead of Perl. It's also a MIND_BOGGLINGLY_ENORMOUS 0.036% ahead of "assembly language", a curiously non-specific term for something that is in my experience rather specific, and also in my experience NEVER used except as a few lines of secret sauce. And it is TWICE as popular as Scratch, which certainly has its niche but that niche isn't "serious programming".

      In fact, a more reasonable interpretation of the tables is that they record how often someone sees a reference to a language and thinks "I wonder what that language looks like? Maybe Google can show me some links. Ah yes. Oh. ... Oh. ... Oh. ... Do people actually *use* that, like, in real projects? Gosh!".

      1. poohbear

        Re: A bit of perspective.

        FWIW, I know of one major life insurer that has its systems written in IBM 360 assembler ....

        Yes I worked on that.

    2. John Styles

      Re: A bit of perspective.

      It is impressive that Delphi / Object Pascal is hanging in their. As lots of people have said the TIOBE thing clearly has its own structural biases, but clearly those biases are going to be unfavourable to Delphi.

  2. John Smith 19 Gold badge
    Go

    Interesting to see what people say/think is the new hottness and what's actually being used.

    I note Java and various kinds of C seem to be the way to go.

    1. Mage Silver badge

      Re: Interesting to see what people say/think is the new hottness and what's actually being used.

      Depressing that THIRTY YEARS after C++ was ported to PC/DOS, Amiga, Xenix etc, that C is still number 2. (I learnt C++ in Glockenspiel, before doing any major C project, oddly.)

      Maybe it's code maintenance or people writing drivers (though you can write drivers in C++). Ditto, Assembler. I don't even use assembler on PIC Micro Controllers.

      It feels like the 1980s, but with a load of new names. Why are so many people using VB.net instead of C#? Real VB ended with VB6.

      1. Ken Hagan Gold badge

        Re: Interesting to see what people say/think is the new hottness and what's actually being used.

        "Depressing that THIRTY YEARS after C++ was ported to PC/DOS, Amiga, Xenix etc, that C is still number 2."

        Blame Linus and his chums. Not only is it compulsory for kernel work in Linux land, it appears to be the language of choice for several very large and popular user-land projects. If you want to contribute to those (which is a perfectly worthy aspiration) then you *have* to learn the culture of C. If you simply assume it is like C++ but without the nice bits, you'll get your pants burnt off at the first code review.

        "Ditto, Assembler. I don't even use assembler on PIC Micro Controllers."

        Very reasonable. Even the smallest PICs these days are probably quite a bit more powerful than the PDP that Dennis Ritchie wrote UNIX for (or should that be "for and on"?). For the last 50 years, assembler has been a language that a handful of people need to know so that they can write compilers for it. (I might add that there are quite a few such languages. Forth, for example, may be irresistably tiny and easy to implement on sensors or similar not-quite-a-real-processor-sized devices, so I've no objection to you putting it there, but that's no reason to make me write it. Give me a proper language and a compiler, FFS.)

        1. Voland's right hand Silver badge

          Re: Interesting to see what people say/think is the new hottness and what's actually being used.

          Ditto, Assembler. I don't even use assembler on PIC Micro Controllers."

          Stock frame buffer driver for ARM written in C shipping with XOrg primitives tested on Allwinner A20/Mali 400. Unf**** usable. If you spin a window with a mouse you can end up with the window being 15 seconds behind the mouse.

          A hack of the same driver (ab)using NEON in assembler using some fairly standard (pretty much lifted out of old Carmack's work) algos for bitblt. Tested on same platform. Flawless - no lag. Probably an >8 improvement in performance. You can look at the hack yourself - search for "turbo fb" on github

          There is still some niches where assembler is of value - low level guts of drivers, low level memory management, etc. This is especially valid if you are (ab)using functionality for stuff which it was not intended for and hence not directly supported by the compiler. Another example are the checksumming and memory moving routines in the Linux RAID code (still mostly in ASM till this day).

        2. John Styles

          Re: Interesting to see what people say/think is the new hottness and what's actually being used.

          A PIC PIC16F54 has 25 bytes of RAM, pretty sure a PDP11 was more powerful than that. What is going to clobber you with the PICs is the lack of a stack (that one has 2 stack levels).

      2. John Styles

        Re: Interesting to see what people say/think is the new hottness and what's actually being used.

        In the words of Sartre, 'hell is other people's C++'.

        The wonderful thing about the multi-paradigm C++ is that everyone in the team can choose their own subsets and no-one could possibly ever have time to write team standards as to what you can and can't use (and would almost certainly be misguided anyway based on their favourite bits from how C++ was when they did most of their hands on development).

  3. Anonymous Coward
    Joke

    Gives a whole new meaning to...

    So Swift hits the charts, then I guess it's now officially a thing to get Swifty? So far I only know how to get swifty thanks to Rick and Morty, but something tells me that's not what they went for here ;)

  4. JLV
    Joke

    A modest proposal

    How about you put a little ditty by Taylor on Autoplay with each article?

    "We Are Never Ever Getting Back Together"? "You belong with me"?

    Would brighten our day for sure. Not.

    p.s. note the Joke icon. I am KIDDDING. Please, lord, no. In fact, how about not putting her likeness at all?

    1. Voland's right hand Silver badge

      Re: A modest proposal

      In fact, how about not putting her likeness at all?

      Why not. Just put the likeness from the previous articles. I kind'a liked this one: https://regmedia.co.uk/2015/02/06/taylor_swift.jpg?x=648&y=348&crop=1

  5. Anonymous Coward
    Anonymous Coward

    Oddness in the rankings

    Much as I love to see Perl in here, I have to be a little suspicious that it ranked higher than R and Go. Or maybe the skill I had that I thought was consigned to the ash heap of history is now so old that there are opportunities for codgers to maintain "ancient" code from the 1990s?

    1. d3vy

      Re: Oddness in the rankings

      "Or maybe the skill I had that I thought was consigned to the ash heap of history is now so old that there are opportunities for codgers to maintain "ancient" code from the 1990s"

      That's my retirement plan.

    2. Frumious Bandersnatch

      Re: Oddness in the rankings

      Yeah, seeing Perl listed as first of the runner-ups in the subhead raised an eyebrow with me. Earlier in the day I'd been reading up about the decline of Perl: why it lost its spot to languages like Python (mostly) and Ruby, and whether it's effectively a legacy language like Cobol now.

      I guess that it's only people of a certain vintage (dinosaurs) that still think Perl is a great language. I never bothered (fully) learning things like Java, JavaScript, Go or Python. I still find that C and Perl do everything I could ever need. On the plus side, practically any platform you can think of will have both of these available when you want them.

      1. Voland's right hand Silver badge

        Re: Oddness in the rankings

        I still find that C and Perl do everything I could ever need.

        That is their virtue and their problem. You can hang yourself in a gazillion ways.

        Projects using C solved that by developing coding style enforcement tools. Some are relatively loose (Linux kernel), some are insanely strict (QEMU). Perl and major perl projects never did. When you combine that with the fact that there is at least 5 ways to write any single thing you end up with severe difficulties in building large projects.

        Compared to that Python had a coding standard and a suite of tools to enforce it very early on. That is why it has superseded Perl as the tool of choice for new projects despite still being inferior in terms of both library coverage and performance(*).

        (*) While CPAN pretty much guarantees you that the license of anything on it is same as Perl so you can "just use it", PiP does not. I have been burned by that more than once and have had to rewrite projects in Perl in order not to rewrite whole libraries. And do not even get me started on the subject of the global lock in the Python interpreter.

        1. Anonymous Coward
          Anonymous Coward

          Re: Oddness in the rankings

          Never found anything better than Perl for munging text. Still lots of text files flying around that need re-purposing and perl is the boss at that for me.

  6. schafdog

    No Garbage Collection but automatic reference counting (ARC)

    There are not GC in Swift, but ARC, which is one of the reason for modest memory footprint, no unpredictable pauses for GC, but you'll have to take care of not creating circular memory references.

  7. Tom 7

    Those who do not understand existing computer languages

    are condemned to endlessly invent new ones.

    I've only been doing this shit for 42 years now and while it might be nice to have a language that has "safety, speed, and approachable syntax" I'm not convinced swift really has any of those when in the hands of humans, especially humans overseen by management and even if it did then that's only 1% of the problem and changing languages is far more of a problem than that.

    While many new programmers may come on the scene from educational establishments knowing Swift it will be 20 years before the best of them know enough programming to make any any (real or imaginary) language bases benefits noticeable.

    1. Anonymous Coward
      Anonymous Coward

      Re: Those who do not understand existing computer languages

      OO languages in particular are structurally broadly equivalent to each other, with the principle differences being syntax, libraries, inheritance mechanisms, reflection, memory management and development environments rather than anything truly inherent in the language itself.

    2. Mage Silver badge
      Coat

      Re: Those who do not understand existing computer languages

      I agree,

      #1 Need good programmers

      #2 Decent management

      #3 Choice of language nearly irrelevant provided the platform/application is suitable for it. Obviously maintaining legacy code is a separate issue.

      Good programmers can learn any new language in a few days, though the libraries might take a month.

      Bad programmers write buggy, insecure code no matter what language they use.

      1. Steve Davies 3 Silver badge
        Joke

        Re: Those who do not understand existing computer languages

        May the FORTH go with you and you end up leading a BLISSful life and your LISP has been cured so that your Aunt ADA can understand your ALGOLithums so that you can then retire to some CORAL island and go PERL fishing.

    3. JLV

      Re: Those who do not understand existing computer languages

      Respectfully disagree.

      True even a very suitable language will not do anything to rescue a project/system from bad management, sloppy coders, bad requirements, bad marketing (either internal "sell" or failure to sell externally).

      On the other hand however, there are broad trends that show languages do matter.

      - is it easy to read? Code gets written once, but maintained many times. PERL fails miserably here and its declining use reflects that. Objective C would probably still be lingering in the bottom of the leagues if not for iOS apps.

      - how easy is it to use by low/mid-level coders? i.e. the bulk of us. C and C++ are very powerful, but require a lot from their devs. They still get used, a lot, but only where their prime qualities - speed, low resource use - overcome the need for being very thorough.

      Biz apps _generally_ don't do C/C++. That's precisely why Java took off, because ease of use, even at the cost of verbosity, does matter. Ditto COBOL.

      LISP might be very nice, but not many people grasp it, so again, not used much.

      - Cultural. What's the accepted language "in the community"? Each problem area has its own set of usual suspects so the choice does matter, because domain-knowledgeable coders and managers are, mostly, language-bound. Writing a banking system in Python would be daft and so would a COBOL web server.

      - Tie-in? C# is, IMHO, a better Java, but is it to be trusted outside of the Windows ecosystem? Stay tuned.

      There's also the magic elixir of acceptance at large. Is the language "respected" by companies? Is it too exotic? I.e. you're not going to be laughed at for suggesting Java, but you might for Rust (at least for now). Smalltalk never gained traction.

      - mem alloc/garbage collection? That's going to impact your domain suitability massively. Real-time capability? Suitability for large code bases? Error handling and discoverability? - something Javascript massively sucks at. Memory allocation scheme and safety - Rust's raison d'etre.

      - system/interop capability. Java interops very well. With Java. And the JVM. Outside of it? Talking to the OS? What's an OS?

      - dependencies and upgradeability. All those programs stuck with obsolete JVM versions are a testimony to something that should be best avoided.

      - Design. There's a reason VB and VB.Net aren't used much by higher-skilled coders - the syntax is awkward and there are many limitations. PHP won't get much love from me either, though I only know it from reputation. Yes, it has very good penetration in web development, mostly because it was the first. Outside of it...

      Java, despite its large following, has spent years trying to do things that other languages do naturally. First class objects? Passing functions? Templates? GUIs (hah!).

      On the other hand, Javascript, a kludgy language designed in a few months, with many odd and unpleasant quirks and which gets no respect in general, seems to do surprisingly elegant things when used by smart people. Babel - basically the equivalent of taking C++ code (new style es6) and transpiling it to old style C (for the existing geriatric JS support in browsers), Vue - a declarative GUI library which beats the pants off something like Swing, d3.js - a visualization library. Taking C code for DOOM or Graphviz, translating it to itself, and running it in a browser.

      So, it is capable of doing pretty clever stuff despite its shortcomings.

      A "better Java, smarter/safer C", compiled, would, if they gained large acceptance, complement the JS/Python/Ruby type of languages very well. Interpreted script languages like those have their uses and their fans (I'm one), but often you need the .EXEs and linked assemblies.

      Currently we are still mostly using C/C++ when we absolutely need pedal to the metal. That's sad, despite the sheer elegance of C's design all that time ago.

      Language design and best practices have evolved over the last 30 years or so and so have the threat models applications in those languages are subjected to. OOP, while gaining general acceptance, has turned out to be a useful tool, but not a silver bullet - inheritance esp is much less useful than first thought. RPC calls like CORBA once seemingly had a future, but have thankfully been dodo-ed out. Heavy stacks like J2EE are not as desirable as once seemed.

      Go/Swift/Rust do NOT merit instant adulation, true. But, if any of them does high-performance/low-resource computing as well as C/C++ do, but with the business friendliness of Java, then I would hardly claim "it will be 20 years" before they make their mark. That underlying unmet need may also explain Delphi/Pascal still kinda hanging on.

      Java itself came out in 1995. So we've barely hit the 20 year mark even now. Wanna say that it has had limited impact in the meantime? How long did C take to take over in the days dinosaurs ruled the earth? Not long at all, I think.

      1. dajames

        Re: Those who do not understand existing computer languages

        Javascript, a kludgy language designed in a few months, with many odd and unpleasant quirks and which gets no respect in general, seems to do surprisingly elegant things when used by smart people.

        That's because smart people will do amazing things with the tools at their disposal when they have to, and in the browser Javascript is the only tool at their disposal. It doesn't in any way excuse Javascript being a kludgy language with unpleasant quirks that deserves no respect in general.

  8. stephanh

    methodology?

    Tiobe's ranking is based on web searches. It's probably better than throwing darts at a board, but not much.

    1. fedoraman
      Joke

      Re: methodology?

      This list might indicate something else entirely -- how much trouble people have in getting their code to work! I mean, you don't search for "How to do $task in $language" if its actually working for you, right?

      1. Michael B.

        Re: methodology?

        or if your language of choice has built in help (eg R) then you won't be hitting search engines as often reducing its popularity.

        1. Geoffrey W

          Re: methodology?

          RE: "or if your language of choice has built in help (eg R) then you won't be hitting search engines as often reducing its popularity."

          Oh, come on...most people don't RTFM. You can stick TFM up their nose and they still ignore it and ask someone on a web site how to do X or Y, and hope someone will write some code for them too so they don't have to bother understanding enough to be able to write their own. BAH!

          And anyway, TFMs usually border on the useless since they merely regurgitate the same info as given by intellisense systems, which comprise merely of syntax and bare comments without any real explanation of WHY this is like this or HOW this is intended to be used. BAH!++

          while (true){BAH!++;}

          1. gnasher729 Silver badge

            Re: methodology?

            "while (true){BAH!++;}"

            The ++ and -- operators have been removed from Swift, with the argument "we would have never added it in the first place hadn't it been available in C, C++ and Java, and being available in other languages is not a good reason to have a feature".

            1. Richard 12 Silver badge

              No increment/decrement?

              Really?

              But that is the one piece of syntax most used by anyone ever!

              Sorry, but pulling that is just stupid and an indication that the design team have run out of things they can usefully do - either the design team must go or the language is dead.

              What's the replacement syntax for "next/previous iterator"?

              - many iterators fundamentally can't jump forward/back by more than one step, what would that even mean for a red/black tree anyway?

              Or is nobody allowed to use while(??){...} loops on sets of iterators in Swift?

              1. patrickstar

                Re: No increment/decrement?

                What makes you think using ++ for iteration is something another language would want to emulate?

                1. Dan 55 Silver badge

                  Re: No increment/decrement?

                  Even if Swift has its own shiny iteration methods that renders everything else obsolete (I don't know), you have to admit that adding/subtracting one unit onto/from a variable is quite a common occurrence. Why wouldn't you want a simple way of coding that?

                  1. patrickstar

                    Re: No increment/decrement?

                    We have that in all C-like languages already - it's called += 1

                    Why should 1 be such a special case? It's kinda ugly and asymmetric, and a pain to change once you need another delta, especially if the code has been written stupidly enough to depend on the value of post-increment vs pre-increment.

                    I consider it a fault in the language, something to best get rid of when designing a new one.

                    AFAIK the only reason for the existence of ++ / -- in the first place was the fast INC/DEC instructions on one of the original archs (PDP11 ?) It's quite telling that other languages with a heritage from different archs and/or smarter compilers lack it.

                    (Mandatory joke: Have you heard about the new object oriented COBOL? It's called ADD 1 TO COBOL GIVING COBOL)

                    1. HieronymusBloggs

                      Re: No increment/decrement?

                      "We have that in all C-like languages already - it's called += 1

                      Why should 1 be such a special case?"

                      Because it gets used more often?

  9. d3vy

    Holy crap VB and VB.net clinging on for dear life there!

    1. Geoffrey W

      VB is the COBOL for the generation after Generation COBOL. There are planet sized masses of VB code out there, all just working, all doing very important work, all needing maintaining.

      If search engines are the tool used to measure popularity then I predict VB/VB.NET will rise in popularity as time passes as there will be fewer people capable of using them efficiently and more people who need to ask "WTF does this do?" or "H(ow)TF do I do this?" as they attempt to maintain or re-program old code.

  10. Planty Bronze badge
    FAIL

    Meh, iOS language at #10 Android at #1

    Why on earth would Google want to move Android to Switft, when it's using Java syntax?

    1. Mage Silver badge
      Coffee/keyboard

      Re: Meh, iOS language at #10 Android at #1

      " ... would Google want to move Android to Switft, when it's using Java syntax?"

      Android is the OS built on a Linux kernel. DAVIK is equivalent to a JVM. The source language for applications on Android is essentially Java using Android APIs.

      Google promotes "Go" rather than "Swift". I'd expect Android consists of many components and drivers written in various languages.

      1. Richard 12 Silver badge

        Re: Meh, iOS language at #10 Android at #1

        Android itself is mostly C and C++, being a Linux kernel and custom userspace.

        Go is rather clever for massively parallel jobs, but I doubt it will ever be very useful for an individual movile device.

        Android apps are mostly Java(ish) or C++. Java has the advantage of not needing an x86 or Arm64 port, but lower performance.

        Often you don't care about speed, often you don't care about x86 as there's hardly any x86 Android tablets.

  11. Andy E

    iOS Only

    Swift is the perfect choice if you are developing for iOS. There's bugger all help if you are trying to develop swift apps for macOS. God help you if you are trying to develop swift applications for outside of the Apple eco-system.

    1. JLV

      Re: iOS Only

      good to know, txs. +1.

    2. gnasher729 Silver badge

      Re: iOS Only

      That's interesting. I had the impression that Swift runs just fine on MacOS X. At least my Swift code does.

    3. Anonymous Coward
      Anonymous Coward

      Re: iOS Only

      at 13% marketshare and falling like a stone. Just what iOS needs, a new programming language...

      1. Anonymous Coward
        Anonymous Coward

        Re: iOS Only

        SWIFT is a replacement (mostly) for Objective-C.

        As for the 13% Marketshare and dropping like a stone...

        Maybe but Apple is still selling a shed load of phones each Quarter. The the failure that is the iPhone 7 sold more than the analists predicted. There are at least 500M iDevices in use. Why would someone not want to develop for that size of market?

        It is far less fragmented than the larger Android market. A friend of mine bought a new Android device a few weeks ago. The fool didn't check what version of the OS it had loaded. It was 4.0 and no upgrade path.

        Yes, Android is a far larger market but a very fragmented one.

  12. Anonymous Coward
    Anonymous Coward

    C still at number 2

    Not bad for a 45 year old language. I'm guessing a lot of it is linux kernel and driver development but that can't explain it all. Just curious - anyone out there using pure C day to day? We use it mixed up with C++, but none of our projects - baring small 100 line utilities - are pure C.

    1. JLV

      Re: C still at number 2

      I could be wrong, but I believe the C Python implementation is still in C, not C++. Had to do with portability as I recall - when it first came out, and for a long time afterwards, it was easier to ensure exact cross-platform equivalence using C compiler support than with C++. Plus, the std-in-1994 C++ feature set may not have had as many tricks as today's standard.

      I wonder how often that is the case with older frameworks/widely used applications.

      1. thames

        Re: C still at number 2

        @JLV - I have a Python library written in C. Most of the libraries that are used in Python which are not themselves written in Python are written in C. C is very widely used for libraries in many applications because it is a lot easier to interface with than C++, Fortran, or just about anything else.

        Interfacing with a Java or C# library (as opposed to the other way around) is nearly impossible once you are outside their self contained ecosystem. The result is that a large proportion of the libraries that are intended to be used by other applications are written in C, at least that's the case for Linux. C is the lingua franca of multi-language programming.

        As as aside, some people have mentioned assembly language. If you want to directly use compiler intrinsics, you need to know assembly language even if you are writing in C. The above mentioned C library uses GCC compiler intrinsics to get performance of up to 7 times faster than just using standard C language syntax. That's not the sort of performance advantage that you can ignore.

      2. patrickstar

        Re: C still at number 2

        C++ traditionally doesn't have a stable ABI, so for actual libraries you are pretty much restricted to C for anything exposed to users.

    2. Richard 12 Silver badge

      C is number one in microcontrollers

      C++ is becoming more popular now that the really cheap ARM M0+ have so much RAM, but when you need raw speed in a tiny memory footprint, it's C or assembly.

      And no commercial enterprise wants to write assembly. It takes too long.

    3. patrickstar

      Re: C still at number 2

      I maintain a large C project on a daily basis. Even though individual C++ features would probably be beneficial, I have a hard time imagining the project as a whole being better off in it.

      If I'd redo the whole thing I'd probably consider some managed language, but it's difficult to find something that fits the portability requirements and size/dependency constraints

  13. wolfetone Silver badge

    Where did Go come from?

  14. Ken Moorhouse Silver badge

    Shooting yourself in the foot...

    Time to update the list...

    http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html

  15. Charlie Clark Silver badge
    WTF?

    What's the point of this article?

    I mean I read it and go: it's another fucking language beauty cost and the author seems to like Swift. Apple liked Swift so much they dumped it on the open source community.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like