Slashdot Mirror


Swift Tops List of Most-Loved Languages and Tech

Nerval's Lobster writes Perhaps developers are increasingly overjoyed at the prospect of building iOS apps with a language other than Objective-C, which Apple has positioned Swift to replace; whatever the reason, Swift topped Stack Overflow's recent survey of the "Most Loved" languages and technologies (cited by 77.6 percent of the 26,086 respondents), followed by C++11 (75.6 percent), Rust (73.8 percent), Go (72.5 percent), and Clojure (71 percent). The "Most Dreaded" languages and technologies included Salesforce (73.2 percent), Visual Basic (72 percent), WordPress (68.2 percent), MATLAB (65.6 percent), and SharePoint (62.8 percent). Those results were mirrored somewhat in recent list from RedMonk, a tech-industry analyst firm, which ranked Swift 22nd in popularity among programming languages (based on data drawn from GitHub and Stack Overflow) but climbing noticeably quickly.

4 of 181 comments (clear)

  1. Re:So is it REALLY good? by bluefoxlucid · · Score: 4, Informative

    Having used both Objective-C and C++, I can point out Objective-C as being a vast improvement over C without bringing the major drawbacks of C++. For one thing, Objective-C specifies symbol resolution against what is actually available, rather than what is theorized: in C++, if you recompile a library with a new class member--even a new private member--the data structure of the C++ class is now incorrect, and all applications using that library must be recompiled; in Objective-C, you can extend a new interface onto a class.

    Largely, Objective-C is C with classes. Along with that, it's C, however you want to take that, with a better OOP implementation than C++. It's not Python or C#.

  2. Re:Test of Time by samkass · · Score: 4, Informative

    This was my reaction to that comment, too. Swift is a strongly typed language, it just infers the type at compile time so the programmer doesn't have to manually enter it when declaring the variable. Considering it also differentiates between variables which can contain "nil" and ones that can't in its type system, I'd say it's one of the most strongly typed languages in common use, so I don't understand the statement.

    The one platform thing is a bummer, but it's changing pretty fast right now so I don't blame Apple for not wanting to lock any decisions in with third parties yet. I hope they add it to their pile of open source projects before too long, though. Considering the reference implementation is LLVM-based, it shouldn't be hard for it to become very portable very fast.

    (Besides, who doesn't like a language which has the entire unicode character set available for variable names, including the symbols? Can make for some colorful code.)

    --
    E pluribus unum
  3. Swift loved 'cause ObjC (and frameworks) supported by SuperKendall · · Score: 4, Informative

    I've been using Swift for production work since shortly after it was released (much of it on an internal enterprise application which is how we were able to start using it right away).

    What makes Swift really nice to use in its own right is that it has a lot of useful language features (like closures, generics, tuples, etc) with a syntax that can be kind of boiled away to the degree that you choose, to keep code clear and understandable. I think the best way I could describe it, is that it's like a functional language buy is very practical and doesn't get preachy about it.

    So already the language is very pleasant to use. The real benefit Swift enjoys that give it such a high rating though, is that it comes with very advanced tooling and a super-integrated mirror-counterpart language (Objective-C) right out of the box.

    Think about it, how many new languages like Rust suffer because you have to build up syntax highlighting support in the editors you like, figure out a new build process tailored to that language, how to run the applications and so on. With Swift if you knew XCode you could easily just start writing Swift and all of the annoying overhead was gone. Even if you DIDN'T know XCode, at least it's a pretty advanced tool dedicated to helping produce running code in very short order (VERY short order with Playgrounds).

    Then along with that, you have a new language which invariably has some missing features or capabilities, that make some particular thing you are trying to do hard in the new language. Well in those cases, Objective-C is very close at hand - you can mix code from both languages easily in the same class even. For example Swift itself is strongly typed and has very few reflection or dynamic method lookup features yet. Objective-C is kind of the opposite way, full of dynamism and runtime reflective use, so you can jump over to those abilities as needed.

    I don't think people outside the iOS community realize just how fast everyone doing iOS development is switching to Swift. Swift (for me) has actually worked really well since day1, the tooling was rough for a while (with the syntax highlighter/code completion crapping out regularily on Swift code) but I THINK it may finally be OK.

    It's definitely not a case of people hating Objective-C, because a lot of the people that like Swift also liked Objective-C. It's a case of having some good tools already, and being given another tool that seems to work really well for some tasks and thus appreciating having an expanded toolbox...

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  4. Re:Test of Time by Alomex · · Score: 3, Informative

    Yes, the GP post is confusing variable declaration and strong type safety. Experience has shown that we want both.

    E.g. "variable x is a string", so if by accident the one time I used it, I happen to write "x=3" I want the compiler to complain and not silently infer the type "x is an integer".

    Second, we want variable declarations so that if you accidentally write "usrename" instead of "username" the compiler complains.

    Swift doesn't require you to give the type during declaration, which is a minor saving at a cost of many headaches. This is the wrong design decision, though I don't think is particularly critical.

    Variables do need to be declared, which is a nice improvement over python and one of a few big things holding python back from total dominance (the others are white space, interpreted not compiled and somewhat weak pointer/data structure support).