The 2018 Go user survey analysis should be released soon, but I'm guessing you're right that it's only used for a few things; however, those few things are pretty significant in terms of marketshare (distributed systems, backend applications, and general purpose tooling--this hypothesis could probably be checked against the StackOverflow survey). Not much on the front-end or mobile application side nor on the embedded side, but probably making some headway on the AI/ML/data-science side.
In general, I think of Go as Python but with 15 years of hindsight but also 15 years of market catchup. Go does a lot of things better than Python (performance, concurrency, distribution, deployment, etc), but the reverse isn't true. The principle advantage to Python is that it was the lingua franca for the data science niche before the niche became a mainstream competency--this means more people were exposed to Python rapidly, but it also means that people are beginning to build high-quality data science libraries in other languages, including Go, which closes the gap between Python and other languages.
FWIW, this is one of the biggest selling points of Golang for me - I love the fact that I'm able to be explicit about reference vs. value, and that it prevents me from shooting myself in the foot when I inevitably screw it up.
It's enough of a differentiator for me that I almost can't put languages with and without pointers in the same mental bucket.
The part about pointers that makes programming hard is that you can create multiple references to the same object, and if you don't realize this, you can modify something that you didn't realize you were modifying. In Python this can happen easily enough:
a = []
b = a
a.append(1)
Question: what is the value of b? You might think that this is pretty obvious, but once you can answer this question correctly, you basically understand pointers. In fact, it's not really relevant whether you say that "a" and "b" are pointers or whether you say that they are object references, conceptually, it does not matter what you call them. The fact that Golang has different syntax for pointers and the fact that you can get the address of local variables or member fields is no big deal, since understanding how pointers work is the hard part, and Python already makes you do that.Package handling in practice I would say is a wash, more or less. Both Python and Golang have multiple different ways of managing packages, depending on your preferences.
It's flat incorrect to say that Python has generics. What Python has is dynamic typing. Golang has interface{}, which is equivalent to what Python has, except it requires casting.
func myFunc(a interface{}) {
a.(interface{ f() }).f()
}
This works for any type "a" which has a method "f" with the correct signature, and this is what I meant when I said “except it requires casting”. The fact that you can’t do this with + is merely a consequence of the fact that + is just the __add__ method in Python, and in Golang + is not a method. The fact that Golang matches method signatures whereas Python only matches method names is not really a substantial difference in my eyes.I don’t think there’s a strong case to be made here that interface{} is substantially different from Any in Python, again, except for the required cast. And I think we all agree that neither Python nor Golang support generics. (Python supports metaprogramming, and you can implement something similar to generics with metaprogramming, but I don’t consider that to mean that Python supports generics. Type checkers retrofitted onto Python also support generics, but I don’t really consider those to be core Python yet.)
I don't think there's much of an analog for C. Most of the interesting stuff in C revolves around things you would think you can depend on but actually break in really weird and interesting ways (misc undefined behavior, sizes for integral types on different architectures, idiosyncracies of the preprocessor, the way to trivially exploit that pattern you used to avoid buffer overflow exploits). But most of that is just depressing.
I hate it when you go to one of those Makerfests, and it actually turns out to be about Makefiles.
Actually is a really good conference to learn Software Development beyond C++
Meanwhile a C conference would have a hard time coming up with interesting content year after year IMO. You'd end up having to talk about how C is used more than C itself, but then you're no longer really doing C-con, you're doing "embedded-con" or "high performance trading con" etc...
I agree with the parent when they compare C to a hammer, it's a super useful tool and I'm glad that we have it but it's not like I could talk about it for hours (or hear somebody else talk about it for that matter).
It mostly falls under the rubric of "writing servers."
Anecdotally, I've heard people using Go to rewrite some of their Ruby services in which more performance is needed.
You think? I'll admit that my view of the Python community is super narrow, but I was thinking Django, me writing a bunch of test scripts, backend stuff. I know data science is a "thing" with Python, but I just didn't imagine that it had become it's main use. I guess TIL there's a whole other world of how people use Python, and it might be most of them. :-)
My personal impression is that Python is used in more fields than almost any other language, but that every community is only peripherally aware of other communities.
For example, Python is big in Earth Sciences (or so I am told). Almost nobody outside Earth Sciences knows that.
Until maybe 5 years ago, I had no idea that people used Python for web development. It had just never occurred to me. GvR famously had to google what wsgi was.
So I think your final sentence probably applies to most users of Python.
I can't think of other niches right now, but whatever one you think, it's probably on the top 5 there.
Practically, while data science / ML / etc work is a big part of Python, I'd wager a much larger part is still web development work (Django et all). And of course, just using it as a "scripting" language, or using it to create GUIs, etc.
I mean, I like JS as much as everyone else and graphql is better with Apollo than it is with graphene, but I can make a full django app and deploy it before I’m even done looking over the changes to my JS packages that have occurred since I used them last.
Hell, even if you want to use vue or react, I still find django more productive than node, Apollo and prisma. And that’s not mentioning flask.
So I’d wager that python powers a fairly large part of the web, and with good reason.