One thing I’ll say about Go, and why I love it. I’ve been coding for decades, and it’s one of the few languages where I find it very easy to read and understand other peoples code.
“ Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.”
There are a lot of cases where these tradeoffs suck and add a bunch of unnecessary friction. And there are many cases where it boosts overall productivity significantly.
I've always considered Scala to be the linear opposite of Go, where over time they have bolted more and more (advanced) features and syntax until you end up with libraries and code as extreme as scalaz [1], and of course every developer will have their own Opinion on how things should be written, formatted, etc. Scala adds choice, Go reduces it.
Oftentimes the argument is "but you don't have to use all these features! you can write Scala just like Java", but in practice that's not how it works. I mean just a for loop is already a headscratcher in Scala.
Not sure if it's the language, culture, or both, but I love it.
"Making the most of your one-on-one with your manager or other leadership", "Communities and Connections will power our growth in 2021", "Static site generation with single page app functionality? That’s what’s coming Next(.js)".
The fact that you can "go <command>" so many things so easily (build, run, test, etc.) beats almost every language out there. It makes starting new projects really easy. Personally, that's one of the main barriers I feel when I'm trying to start anything in other languages.
Consider Java (or Kotlin, for that matter). You need either a Maven POM or a Gradle build file. Gradle makes things a little easier with 'gradle init', but you're still stuck with arcane build files either way. If you have to use Maven and need any plugins... Good luck with that.
I think the general pattern here is that pretty much every language doesn't stand on its own when it comes to starting and working on a project. You need external build and dependency management tools. Go has it all built-in and it's super easy to use. It's beautiful.
Language-wise, I want a language that's as versatile as Kotlin, with the ease of use of Go. Imagine having a bunch of .kt files and just being able to 'kotlin build', 'kotlin run', etc. That'd be gold.
You can do that today with C# and .NET Core - initialize and build your project straight from the command line with standard tooling bundled with the language (of course .NET Core's tooling is a lot younger than Go's, and in a typical .NET environment you'd be expected to be using Visual Studio or some other IDE, and probably have to deal with legacy projects that depend on old tooling).
https://ttu.github.io/kotlin-is-like-csharp/ https://docs.microsoft.com/en-us/dotnet/core/tools/
I would argue its more about code readability and maintainability than speed. Can I take a java developer and have him/her look at some Go code and know what's going on? For the most part I would say yes.
I'll add my favorite pros as well:
- the language is very simple and explicit, which makes it easy to understand third party code bases
- the spec moves very slowly (or not at all), which ends up protecting the investment that you make into your software in the long term
-error handling is kinda ugly and verbose
-no generics
-interfaces are done through duck typing
-null pointers
-int size is platform dependent
-no built-in immutability
Go will fail to build if you have unused dependencies or variables. (And it's easy to use the convenient `:=` in a way which faces problems exacerbated by this).
If I'm debugging through something, I might be adding packages or intermediate calculations to try and figure out what's going wrong. But because the Go compiler enforces this proper style of "nothing unused", there's that much more friction when tinkering.
This will hopefully reduce some of the friction you are having.
- it's the exact same 4-6 criticisms every single time
- "no generics" is on the chopping block
When criticism is valid, it doesn't matter if it's novel or not.
Ironically, golang codebases tend to be more verbose than Java.
I want to make a pasta comparison but can't think of a good one for Go, since it's often quite straightforward / not-spaghetti. Java is often lasagna code though.
This isn't necessarily an argument that those criticisms are wrong, though.
Easy to learn and without much arcane hierarchies and easy to read and maintain. The longer I write code the more I'm drawn to simplicity as the most important thing about a language.
I appreciate how easy it is to write and how incredible the performance is, but I get tired of the style of code it forces you to write. I write a lot of code to reduce the amount of code I need to write. In Go, that's not really easy to go or necessarily a good idea because of the lack of generalization.
Not saying someone can’t screw up codebases in go, but it’s just much harder to do and you usually see it right away by noticing abuse of interface{}.
This is where one of those sayings come in; "Duplication is better than the wrong abstraction"
But on the other other hand, it opens up possibilities to tackle other criticisms of the language - error handling and nil, which can be solved with Either and Option types found in other languages.
My background is Visual Basic, PHP, C and C++ and then C# and F# for the longest part. Coming from .NET Go feels like a huge breath of fresh air and brought the fun back into programming. What I enjoy the most is the simplicity (not to be mistaken with the language being “simple”) and the vibrant OSS ecosystem. With Go I feel like I’m actually programming again and solving problems. My focus is to deliver value. With C# I feel like 50% of the time is spent understanding everything around it and mastering .NET with the anticipation that the next project will benefit from my expertise, but before the next project has arrived the .NET landscape has changed significantly enough so that I’m yet again spending 50% of my time mastering the language rather than building something cool.
Go is great for readability and changing of code, depending on the dev and time though.
Could you explain this? IIRC they kept the language simple so that they can keep things elegant in tooling / compilers / etc as well. Or is this about the runtime?
- Simplified, familiar syntax for those who already know a C variant
- Concurrency model (CSP) which works nicely with the request/response paradigm of server communication
- Performance comparable to other statically compiled languages.