Slashdot Mirror


Google's Go Language Surges In Popularity (infoworld.com)

2016 saw a big spike in the popularity of Go, attributed to the rising importance of Docker and Kubernetes. An anonymous Slashdot reader quotes InfoWorld: Ranked 65th a year ago in the Tiobe Index of language popularity, it has climbed to 16th this month and is on track to become Tiobe's Programming Language of the Year, a designation awarded to the language with the biggest jump in the index...which gauges popularity based on a formula assessing searches on languages in popular search engines...

Elsewhere in the index, Java again came in first place, with an 18.799 rating while C, still in second place, nonetheless continued its precipitous drop, to 9.835% (it had been 16.185% a year ago). In third was C++ (5.797%) followed by C# (4.367%), Python (3.775%), JavaScript (2.751%), PHP (2.741%), Visual Basic .Net (2.66%), and Perl (2.495%).

The article also cites an alternate set of rankings. "In the PyPL index, the top 10 were: Java, with a share of 23.4%, followed by Python (13.6%), PHP (9.9%), C# (8.8%), JavaScript (7.6%), C++ (6.9%), C (6.9%), Objective-C (4.5%), R (3.3%), and Swift (3.1%)."

25 of 252 comments (clear)

  1. But what is it used for? by Anonymous Coward · · Score: 3, Insightful

    I looked for use cases a while back and couldn't find anything except crawlers.

    I hate how easily programmers jump on a bandwagon.

    1. Re:But what is it used for? by Lisandro · · Score: 4, Interesting

      It fills nicely the niche between low and high-level languages. You get C-like semantics, modern data structures, memory management and high performance with fast compiled binaries.

      Also, it is one of the few languages out there where concurrency is not an afterthought.

    2. Re: But what is it used for? by Anonymous Coward · · Score: 2, Interesting

      Go billed itself as a systems programming language. I dont know about that, but Go is useful if you need massive concurrency. Goroutines make it trivial to spin up new threads and keep things in sync. In fact, the entire language seems to revolve around that concept.

      Go is strongly typed, so you get the benefit of eliminating certain classes of errors at compile time. Speaking of which, the compiler produces very fast code.

      Some of the weaknesses of go are that it lacks support for generics (and developers are hostile towards the idea), it has a weak stdlib (well, compared to python or rust anyway) and the syntax is kinda weird.

      My opinion is this: If you just need a general purpose programming language, go doesn't give you anything new. It sits in a strange place where it is not c but also not quite high level, so you get high-levelish things (such as goroutines) but you still need to deal with c type annoyances.

      You are better off with python, java, c# or even c++ in most cases.

      But if you need lots of concurrency, and can live with the limitations, go is ok.

    3. Re:But what is it used for? by Tough+Love · · Score: 3, Interesting

      You get C-like semantics, modern data structures...

      Modern data structures without classes or generics? This is where I checked out on Go after initially being interested.

      memory management and high performance with fast compiled binaries....

      And no way to avoid the memory management, a crippling problem shared with Java that makes it a bad choice for many applications (e.g., low latency financial transactions). Face it, Go is a bland language with really only one thing going for it: promoted by Google. Much like C# is promoted by Microsoft, which didn't overcome the mind share issues of that platform either.

      It's just not clear what problem Go solves better than any alternative. If you want highest performance and lots of big team software engineering support, you go with C++. If you need managed memory and access to the copious supply of 2 year diploma programmers and don't mind throwing a bit more hardware at your problem you go with Java. If you need to churn out web2 sites as fast as possible then Node or Python. It's just not clear where the demand for Go is supposed to come from. From where I sit, Go is just another pretender to the Java throne, not any less bland than the incumbent and decades late to the party.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    4. Re:But what is it used for? by OrangeTide · · Score: 3, Interesting

      I'm a long time C programmer, and I like Go a little better than C for concurrent programs. It's not quite as ground breaking as something like Erlang, but it's quite a bit easier to throw something together to run reasonably well on a cluster than say Java. I wouldn't want to write a kernel in Go, but it's pretty hard to displace C in that niche.

      --
      “Common sense is not so common.” — Voltaire
    5. Re:But what is it used for? by lgw · · Score: 2

      As for generics, I am very confident that Go will eventually have them, but you are indeed correct that it does not have them today.

      This kills Go for me.

      One of the big problems with C++, C#, and Java is that generics were an afterthought (and still are, in Java). Those mistakes were made a long time ago now. For a new (-ish) language to repeat that mistake just makes no sense.

      Yes, your language needs to have strongly typed container classes, and not just those in the standard library. Go natively supports strongly typed maps and dynamic arrays, which is nice and all, but how was it not obvious that it needs a mechanism to make more such things?

      --
      Socialism: a lie told by totalitarians and believed by fools.
    6. Re:But what is it used for? by dottrap · · Score: 5, Informative

      Go was created by Rob Pike and Ken Thompson to solve real problems Google was having with its massive C++ code base.

      The domain they work in is huge scalability, server backends.

      You are right, it is a boring language, and that's just how they like it because Google is trying to solve their very specific problems without creating nightmares of new ones.

      Go is designed to address many of the scale complexity problems they faced with C++, in both human terms and machine terms. In human terms, C++ is a very complex language. In machine terms, the joke was that Go was invented while waiting for a C++ compile job. (Google's build times are frequently measured in hours.)

      Go also addressed scaling problems for other languages. Java, C#, Python, Ruby, NodeJS, etc. consume a lot more resources to spin up their virtual machines. At Google scale, this adds up to needing a lot more hardware, and a lot more power to run the data center, and a lot more cooling needed.

      And since most of Google's server requests have no dependencies with each other, they could build directly into the language mechanisms to support concurrency. (And they make it a point to distinguish between concurrency and parallelism in computer science terms.)

      In the end, Go is a fairly simple language that people from scripting languages can pick up reasonably, while getting pretty decent native performance, and also getting concurrency features which are optimized for their domain.

    7. Re:But what is it used for? by ooloorie · · Score: 2

      Rob Pike is more than likely looking towards some strong use cases in production that would have been better with generics than without them. He seems very caution to add big unwieldy whiz-bang features and is willing to suffer some tedious C-like software in the interim.

      Go is 10 years old, and Rob Pike has been at this for forty years, and he still doesn't understand the common use cases for generics? Perhaps he should retire and go into Bonsai pruning or something, because language design doesn't seem to be his forte.

    8. Re:But what is it used for? by Anonymous Coward · · Score: 2, Insightful

      I'm pretty sure the smart people at Google didn't get any of those memos

      Have you seen the Google Style Guide for C++ when they first released it on svn? It was written for C with classes, some of the desicions were based on having simple text search as only available tool for code lookup, others were base on C++ predating the 98 standard and more based on legacy issues.

      Basically Googles biggest problem with C++ was a large codebase of legacy code nobody wanted to touch and Go solved this by simply throwing everything away, starting from scratch. It means maintaining less since they can just chuck decades of work into the garbage bin everytime they hire a new Rob Pike.

    9. Re: But what is it used for? by Lisandro · · Score: 3, Informative

      Let's not pretend that go has some magic concurrency primitive that is anything other than a normal thread launched by the clone syscall.

      Oh, but it does - though i wouldn't call it "magic". Don't take my word for it: write a small program spawning, let say, 100000 goroutines. See how many system threads are launched.

      From the documentation itself: "They're called goroutines because the existing terms—threads, coroutines, processes, and so on—convey inaccurate connotations. A goroutine has a simple model: it is a function executing concurrently with other goroutines in the same address space. It is lightweight, costing little more than the allocation of stack space. And the stacks start small, so they are cheap, and grow by allocating (and freeing) heap storage as required.

      Goroutines are multiplexed onto multiple OS threads so if one should block, such as while waiting for I/O, others continue to run. Their design hides many of the complexities of thread creation and management."

      You're mixing up concurrency with parallelism. Rob Pike had a couple of very interesting talks on the matter.

    10. Re:But what is it used for? by Tough+Love · · Score: 2

      ...Basically Googles biggest problem with C++ was a large codebase of legacy code nobody wanted to touch and Go solved this by simply throwing everything away, starting from scratch. It means maintaining less since they can just chuck decades of work into the garbage bin everytime they hire a new Rob Pike.

      Ding, you nailed it. With Go they can create a new, large codebase of legacy code that nobody wants to touch, with the added complication that you need to train each new hire for months in the new oddball language that wasn't in the curriculum.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    11. Re: But what is it used for? by Lisandro · · Score: 2

      Sheeze. Ok, to wrap it up: goroutines are not OS threads like you originally suggested. There's not a a clone syscall associated with every goroutine; in fact, you can limit the number of concurrent threads on a Go process to 1 if you like and have them all run under a single process. See GOMAXPROCS.

      Now, the concept of goroutines is arguably much closer to what's commonly known as "green threads". But again, this is not what you originally stated.

    12. Re:But what is it used for? by DrXym · · Score: 2
      The lack of generics does seem a bit weak. I've read a few articles trying to work around lack of generics and some of the suggestions are borderline comical - one suggested way was to copy and paste the same code around a bit. Another was to write a script which machine generates code from a template.

      Personally I think Rust does generics pretty well. A generic function or struct takes one or more type args which are supplied at compile time. The generic normally enforces the types it will accept based on the traits they implement. The compiler gives meaningful errors too instead of an incoherent wall of screed that C++ outputs when some heavily nested inline code breaks using the type it was expanding to use.

      I expect Go could do something similar except of course using interfaces instead of traits as the gatekeeper.

  2. Rather meaningless single value metrics by chrism238 · · Score: 2

    I understand that it's a failing of us humans to comprehend multi-dimensional data, but reducing a programming language's "popularity" to a single value really helps no-one. But because we're obsessed with such things, at least choose measures that place the weightings back into the hands of those that wish to match the data to their needs. Try the IEEE Spectrum interactive rankings: http://spectrum.ieee.org/stati... where Go performs even better - except for jobs.

  3. Syntax by MikeJones8766 · · Score: 2

    Anyone else find Go's syntax horrible and avoid the language completely because of it?

    1. Re:Syntax by doktor-hladnjak · · Score: 3, Interesting

      As somebody who started writing it about 75% of the time at my job starting earlier this year, I found it weird at first because it's pretty different from other popular languages. But once you get used to writing it, it really does become transparent and second nature.

    2. Re:Syntax by ooloorie · · Score: 5, Funny

      I'm also not too fond of its semantics, and find the libraries somewhat limited. But other than syntax, semantics, and libraries, it looks like a great lanaguage!

  4. Re:Another attempt to start anew... by Lisandro · · Score: 2

    And, speaking of compiling, the executables are large — even if you use somebody else's code, you must still compile it all into your application...

    ...by default. Try go build -linkshared.

  5. I bet half the people who said "C" actually by melted · · Score: 4, Interesting

    I bet half the people who said "C" actually meant C++. There's really no reason to use C except in projects that are already in C, since C++ is an almost exact superset of C. So you can write everything in a procedural style, but still use STL and strings, and other minimal conveniences.

    1. Re:I bet half the people who said "C" actually by lgw · · Score: 5, Informative

      2K ram - check
        8k flash - check

        STL - yeah sure

      Depends on the compiler, of course, but the STL isn't some runtime library, it's a set of templates, which means only bits you use get compiled. Strings and vectors tend to be reasonably lightweight.

      Unless of course, you're the guy who says "I'm not going to bounds-check my array access, I only have 2K!" leading to the world's biggest botnet of Internet-enabled toilets.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    2. Re:I bet half the people who said "C" actually by BESTouff · · Score: 3, Insightful

      Forcing projects to C avoids possible bugs and unreadable code from cowboy programmers on your team using some of the more esoteric features of C++.

      This ! I've been working in several embedded systems companies, and we always have avoided C++ precisely because of this.

      It also is a requirement for embedded systems, which includes everything for an arduino and their bigger cousins.

      (OTOH not really this, I'm seeing more high-level languages, even JS, everywhere)

    3. Re:I bet half the people who said "C" actually by serviscope_minor · · Score: 2

      2K ram - check

      Yep!

      8k flash - check

      Yep!

      STL - yeah sure

      Yep!

      Or are you claiming you can implement, say, std::priority_queue in a way that uses fewer resources than the STL version. And if yes, prove it because I reckon you can't.

      --
      SJW n. One who posts facts.
  6. Re:Another attempt to start anew... by OrangeTide · · Score: 5, Informative

    Rob Pike is hardly a kid.

    Go was never about making a beautiful language. It has been about making different compromises than the ones C had to make 45 years ago. All practical languages are a set of compromises.

    The lack of shared libraries are an intentional feature of Go. Generally in a cluster environment they cause more problems than they solve. There isn't anything fundamentally special about Go that would prevent it from having dlopen, it just doesn't have it today because the people who are interested in Go aren't interested in dynamic linking.

    The executable size issue is slowly improving. There is an open bug to track it, and while the bug is very old, it still gets regular updates. And only the things that are needed are included in the executable, not "everything". If you make a HelloWorld app, then the big bloat in your app will be the garbage collector. But once you go beyond writing extremely trivial programs the size of your executable doesn't increase at a rapid rate. You should settle on a Go program of any significance being about 2MB to 10MB (where you link almost everything), then slowly going up from there. Another way to put it, is that your executable will be about 0.1% to 0.5% of your system RAM, the kernel will demand page it so if there really are unused parts they won't use precious RAM.

    --
    “Common sense is not so common.” — Voltaire
  7. Tiobe's ranking system gets confused easily. by Anonymous Coward · · Score: 2, Interesting

    You may note this massive, unprecedented serge is usage happened at the same time as pokemon go got very popular.

    It will drop massively over the next few months because the system wasn't picking up references to the language, rather false positives to pokemon.
       

  8. How do you measure Google's language popularity? by m.alessandrini · · Score: 2

    By searches on popular search engines. Uhm....