* I didn't "find" my use cases - they found me. All are real things I do with Python.
* I'd switch to something faster than Python, and finding more errors statically, if it wasn't for the bunch of things I'd miss.
* I like C better than C++ though the former lacks operator overloading; it's not "the essence of a good language", just one thing I use in Python.
* Further evidence that "I'm not here to bitch about Go for the sake of it": I didn't mention generics or similar, for instance - because they don't matter in the cases where I use Python, at least I don't recall that they do. I'm not looking for things to complain about.
* Deployment, etc. - it probably won't make someone switch to Go though it might be nice if you start in Go, and also - it's an argument in itself. I like how in Python you can change a file and all code using it "sees" the change, or how in languages with dynamic libraries/runtimes/whatever you change the library and all code "sees" it. Basically there are deployment trade-offs and in my environment - a controlled LAN - Go is simply worse. On a DreamHost box with ancient everything it'd be a godsend.
Overall - I don't think "Python is better than Go", but the ones who "beat their chest about how your language is a superior language because it is superior in a very specific niche" are people arguing about Go the way you do :-) That niche in Go's case being servers.
Speaking of servers... I know the difference between servers and web servers, I just said/implied that if Go is great for web apps, then it might take off as a really big thing, if it's just for high-performance infrastructure it's a language for Google, CloudFlare and a small number of others...
You've been saying that it's just about your own use cases, but your statements in that post are much more general. For example:
> What does Go have that Python lacks? Performance, static typing.
That's a very simplistic view. Being a long term Python developer that switched to Go as the preferred language years ago, here are some of the things I appreciate on the other side of that fence:
- Performance, indeed.
- Static typing, yes.
- A simpler language specification (a big one for me, game changer for large code bases in large teams)
- Interfaces based on structural typing ("static duck typing", as some say)
- Much better control of memory layout (struct with 2 int64s takes 128 bits in memory, a list of those takes N*128bits)
- Built-in micro-threads (goroutines)
- A runtime that schedules (means, you can block, despite concurrency)
- Buffered and unbuffered channels managed by the runtime (with select, etc)
- Builds native static executables, fast (maybe you don't care, many people do)
- A much better organized standard library
- A very good http server _and_ client package in the standard library
- Good crypto packages and APIs in the standard library
- Error handling without exceptions (that's a pro for me and many, feel free to disagree)
- A very elegant system to define access control (private/public) on vars/funcs/types/fields/consts/etc.
- All names inside files that are part of a package ("directory") are part of the same namespace (allows better organizing code than with Python's file-is-a-module style)
- Code files that can see declarations out of order (improves code organization)
- gofmt! godoc! Love those.
- None of the Python 2 => 3 migration mess (people are being told to program in a pseudo-language that is neither Python 2 nor 3 in recent times)
And so on... That's not to judge your use of Python, though. By all means stick with Python if it suits your needs.
As a last point, if you're interested in Qt bindings, I've been working on this:
I have been really disappointed and underwhelmed by Go's performance (I have not tried the gccgo yet). For such a simple, statically typed language I was expecting really an order of magnitude better performance. So, in light of Cython and Pypy the performance story is quite murky, the other points do stand.
Performance is always a hard topic to talk about. For almost any language you can optimize hotspots in the code to make it go super-fast. You can make any code run slow in any language if you are not familiar with how the language behaves.
Go has pprof which allows for profiling of your code to help find the hotspots. Without a specific case it's hard to say that Go is fast or slow compared to other languages.
That's not about how much the code might be optimized. I could always step out of Python and do a C module if I needed speed.
Instead, what's valuable in terms of the perceived performance delta is the speed of standard code as one would write intuitively and conventionally. With a reasonable understanding of how CPython compiles and interprets code, and a reasonable understanding of how the standard Go compiler suite generates binary code, one can make ballpark-style statements of performance for such code without lying too much.
Sure, there's PyPy, and there's gccgo, but that's not what most of the respective communities are using today, and it's not what we use in the projects I'm part of either.
I'm curious - why did you go with Python over Java in the first place? Many of your bulletpoints are also things that Java gives you, except for the duck-typed interfaces, goroutines, and control over memory layout.
* I didn't "find" my use cases - they found me. All are real things I do with Python.
* I'd switch to something faster than Python, and finding more errors statically, if it wasn't for the bunch of things I'd miss.
* I like C better than C++ though the former lacks operator overloading; it's not "the essence of a good language", just one thing I use in Python.
* Further evidence that "I'm not here to bitch about Go for the sake of it": I didn't mention generics or similar, for instance - because they don't matter in the cases where I use Python, at least I don't recall that they do. I'm not looking for things to complain about.
* Deployment, etc. - it probably won't make someone switch to Go though it might be nice if you start in Go, and also - it's an argument in itself. I like how in Python you can change a file and all code using it "sees" the change, or how in languages with dynamic libraries/runtimes/whatever you change the library and all code "sees" it. Basically there are deployment trade-offs and in my environment - a controlled LAN - Go is simply worse. On a DreamHost box with ancient everything it'd be a godsend.
Overall - I don't think "Python is better than Go", but the ones who "beat their chest about how your language is a superior language because it is superior in a very specific niche" are people arguing about Go the way you do :-) That niche in Go's case being servers.
Speaking of servers... I know the difference between servers and web servers, I just said/implied that if Go is great for web apps, then it might take off as a really big thing, if it's just for high-performance infrastructure it's a language for Google, CloudFlare and a small number of others...