Go is a great programming language
drewdevault.com
drewdevault.com
Agree! I've been programming with Python for the past 6 years using Django and have now fully committed to writing Go using only the standard library. It's a great language for web-development and would highly recommend it to anyone.
If I had designed this language in a "design a new programming language" college class, I'd probably have gotten a C+ for my efforts at best.
What Go is, is a great tool more than a great language. I like to use it because my output from it is usually reliable, is on time, is light on resources, is easy to deploy, and allows me to get kudos at my job and more $$$. It's wonderful screwdriver for today's screws.
But I don't think it's a great language the way a LISP is a great language, or Smalltalk, or Haskell, or OCaml. It won't really open your eyes to a new way of thinking about problems that you didn't already know from your C days. You still have too much interface{} stuff everywhere, or reflection (which is extremely tedious) or pretty-awful code generation compared to LISP macros.
You are completely right. As a language, Go totally sucks in comparison with other "modern" languages but I think no other "modern" language beats Go when you look for them as tools. Go is a "get things done" kind of language that imposes a lot of constrains on what you can do and how you can do and this limits how developers can express themselves, and it makes Go sucks as a language but these exact constrains make Go excel as a engineering tool because Go code is easy enough to read and understand so it makes your team move fast without break things, fast compilation, fast executions, easy in hardware resources.
Definitely a great engineering tool.
I was an early adopter of Go and used it for some small projects before it hit 1.0. It's a pleasure to use and the ecosystem and the team at Google are top notch. I count it among the most impactful projects that Google has done ... among such accomplishments as Android, Youtube, Search, Maps, Chrome, and Gmail. Go is the bedrock on which thousands of impactful projects, like Kubernetes, Docker, and others are made possible. And those projects in turn empower thousands of startups to create better software.
Hats off to Google for that one. Google has become a sort of lumbering giant but it still does great work.
I don’t think Go is considered uncool - if anything it’s the opposite. Probably fair to say that Go is “cool” for hackers and CTOs but “less cool” for formal computer scientists since its type system is limited (and even then goroutines are interesting as first-class construct). But I like Scheme, F#, and Idris, so don’t take my word for it :)
I should have loved Go but in fact had found it to be very verbosy, boring and mediocre at all lang. Of course it more suited for many tasks compared with Java, C++ or Python but... I still cry when try to compare with Nim or Crystal.
It is like Python in that it is modern, has a rich set of good libraries to do stuff, a simple method of codes reuse (interfaces rather than dynamic duck typing). You have first class functions so you can write cool call back based Jason transformers or the like. Ten liner Python reformatter is twenty in Go. Still clever and way faster and runs on sixteen or 32 cores with no work, assuming you design the program with the data flow in mind.
I have not written many web services, just one gRPC thing which was the typically slow first use of a new framework couple of days work. Mostly I write network shimmies, eg syslog to Kafka or NAT to squid, or else S3 bucket editing utilities.
That's a funny bit, what is modern about Python? A 30 year old language that predates even Java?
If it fits neatly into the built-in data structures or smells quite systemsy and C-like, it's probably fairly easy in Go.
String and array manipulation are similarly painful to C. The lack of generics can be a massive pain in the neck, meaning you end up copy/pasting things, and other people's code doesn't tend to be very easily extensible without actually editing it to add the appropriate interfaces or whatever. The lack of OO is sometimes fine, sometimes not. It's really not a very expressive language. (I appreciate that's a rather fluffy/vague thing to say, but I feel it's true.)
On the other hand, you can cross-compile stuff trivially, you get nice self-contained binaries, it's generally sufficiently performant, and it's simple in the same kind of way C is, only with a garbage collector and easier threading (goroutines are pretty nice).
There's no more ceremony really compared to something like Python+Flask, but the business logic you end up running behind your web API calls _may_ be a bit more verbose and feel clunkier. Or if you're lucky it may not. It's very much dependent on what exactly you're doing.
I understand many people feel different but I've been permanently turned off from it.
This is a thinking error I see extremely frequently from golang proponents, and it has never made any sense to me. If it were true, it would mean that forth would be a great programming language to work in to keep complexity low - after all it is an even lower complexity language.
Having an, as I'll rephrase it, anaemic language really just means that people will either limit the scope of what they write in it to low complexity things, or, more frequently in my experience, will simply not bother handling the potentially complex details of what they're trying to do, because it's simply too painful and laborious. Corner cases don't get handled (can you really justify the extra 200 lines to handle that case?), user-facing edges don't get smoothed off (can you really justify the extra 200 lines to be able to handle float inputs to that option?), things generally just get dropped on the floor. And I don't blame people - I get to the end of a day and the idea of having to write yet another for-loop makes me just want to go home instead.
The hair-shirt philosophy of golang is not one I subscribe to.
I think the word "simplicity" needs some quantification, because I think often people mean it's easy for beginners = simple. And that doesn't ring true for my definition of simple.
What I'm more interested in where it is "simple", is that it allows logic that doesn't need to be entangled to remain cleanly seperated so that changes to one need not require you knowing about any other parts of it, and are not at risk of breaking anything else.
And similarly, that if I were to build something with inherent complexity the language would add minimal additional complexity above it.
Does Go meet that definition of simple?
Of course this language simplicity means that programming in the language is much harder. To me that’s almost tautological: things the language doesn’t do for you become things you have to do yourself.
Golang is my main language unless I need something quick and dirty dealing with strings, in which case I'll use python.
I want to pick up some rust for really low level stuff, but the rust community is a bit of an opaque cult.
> reason mathematically about the code, not experiment with it to see if it throws these exceptions or retries
Do you consider `panic` (in Go or Rust) a "hidden jump"?
The thing that annoys me about exceptions is that they can be slower that you'd think, make safety analysis really hard (i.e. regular control flow isn't too bad, exceptional control flow can be weird), and are a pain to implement. And with Go I don't think of those things as being a priority.
If you find a thing you like, you should use it! If you find a thing you don't like, just don't use it! Find the language that lets you express your intention as easily and correctly as possible and run with it. For some people that is Go, for some people that is Erlang.
I'm certain this thread will devolve into "Go isn't a great programming language because..." type posts, but I really think those posts are kind of ill-intended. The author of this post likes Go, which they're allowed to do, and they should continue using and enjoying it.
If you prefer Go, and are on a Java team, you'll want to convince others that Go is far superior, and vice versa.
If you prefer Go, and are on a Java team, does arguing with people that are unrelated to your work on the internet change your working environment?
Does arguing on the internet with Java fans increase Go's usage at hypothetical person's work?
> People who don't care enough to criticize the status quo don't put forth the effort needed to change it
Nowhere in my post did I suggest people should not criticize the status quo.
To example this point: the fact that people do still sometimes need write some code in assembly really should demonstrate that your point would be better framed as "different languages serve different use cases so it's pointless convincing everyone to conform to a single language" -- which is precisely the point the OP was also making.