A Farewell to Go
churchwood.at
churchwood.at
It's pretty clear going into go from the initial HelloWorld -- that you are expected to:
1 - use gofmt 2 - won't have inheritance 3 - Drudge your way through a solution for dependency versioning
To complain about it so late into a project really speaks poorly to the author.
There's really no need for such a personal attack here - why do you feel a need to lash out at this author?
It is entirely reasonable to start a project knowing of limitations, and finish that project with a better understanding of how those limitations affect your productivity in the real world. That's what we call experience, and learning from it is a critical element of personal growth.
the whole blog post is lashing out at something. You reap what you sow. There's no "these are the tradeoffs, and this is why I disagree with those tradeoffs"; every argument goes like this:
- I have an expectation
- that expectation is informed by my priors, not by Go
- Go didn't meet my expectations
- even though Go never made or promised to meet those expectation, I'm going to be mad that it didn't do something that I wanted that was never promised
the whole article is structured like "Go wants me to think in a different way than I already think and I refuse to think in a new way".
Go is a language, attacking Go is not justification for you to attack the author. Replace Go with a rant about Ford trucks and you'll see how silly you are being.
1 - Most editors automatically support that. I wouldn't say being forced to follow a certain code convention is bad, but it understandable that it may bother some people.
2 - You can still the code-reuse features of inheritance by using embedded structures with methods attached to them.
3 - There are many solutions which solve the problem without needing to commit the vendor directory to git like `glide`.
A simple language with enforced formatting means the code that I wrote several years ago looks much like the code I'd write today. Vendoring dependencies means I can ensure my environment works today as it worked when the application was being developed, and I don't need to go hunting for old dependencies that may not be there anymore. Lots of batteries included in a standard library that has a strong backwards-compatibility pledge means I often don't need libraries.
I've never worked with Go outside of an enterprise; I wonder if these pieces are maddening there.
I find this to be the most damning drawback: by design you can't ever get better with it, to cater to people who shouldn't be in the profession. There's a reason that using a spoken language clearly and eloquently is beyond the skill of a young child.
I agree that vendoring is the right solution for libraries that are not packaged for your target platform, in fact it's damn hard to reach truly deterministic offline builds without vendoring.
According to my opinion, a programming language should let a developer use his or her style.
gofmt is the best part of Go. Everybody's code looks the same. Broken Package Management
This is a solved problem with dep. Switch your Go projects to dep today. In the documentation there is no mentioning of those missing things, you expect from a modern HTTP library.
Go's philosophy is "less is more." This is the journey of every Go programmer: What?! Go doesn't have X??? This is an outrage!
* figures out how to do it without X *
I guess I didn't need X after all. I just had to write a bit of code.Hopefully someday they build a monument to K&R with "less is more" written on it. As someone currently stuck in a Scala project, I'd donate a sizeable sum towards that goal.
This never works correctly for me and I have no idea why. I haven't written enough Go lately to get this sorted – but it's definitely not quite so obvious.
This is the journey of every Go programmer:*
There are steps after that though:
Oh, I guess I have to copy that code from before. No big deal.
Oh, right. I have to copy it again, with some changes? I guess that's okay.
Wait, did I fix this bug in the other copies too?
fire and burning pain.I guess I don't need functions and variables after all. I just have to write a bit of assembly code (for some definition of "a bit"). When the complaint is that a language is insufficiently expressive, noting that anything is possible at the cost of being more verbose isn't really a refutation.
That is not a feature. Consistency and readability are not the same thing - it's a lazy substitute for readability, at best.
From a quick glance, `dep` seems to still be using source/repository URLs as dependency identifiers, which is a terrible idea. Other languages use a registry for a reason.
Rob Pike's quote about "They’re not capable of understanding a brilliant language" is extremely unfortunate, and a missed opportunity to elevate the art/science of programming and the much larger understanding of information theory in general for all programmers, instead of trying to appeal to the lowest common denominator. My first question would be "why would anyone pick a language that is designed out of the box to ultimately limit the depth of their understanding?
a tremendous number of production systems written in Java, being used by a tremendous number of people, and making a lot of money for corporations?
That's the goal of Go. It's not for research, it's not for discovery: it's for dominating the marketplace. If Go replicates Java's fate, it will have succeeded at its goals, because it's goals are to be used in production systems run by corporations.
However, all the rest of the points are pretty valid. Go has the potential to be an awesome language and environment, and minimalism as a language attribute is attractive. But it's so frigging annoying to use in practice.
Interfaces help to solve the problem with methods of objects, but not with data members.
I wonder if the author knows about structure embedding in Go at all. Go willingly chose to not support this behaviour causing me to write a lot of duplicated code. For example, my SAP analysis web interface uses three different product group structures, as the required amount of details varies between user stories. Go forces me to maintain the same code in three different places.
I think his reference to "duplicated code" means that he has the same data members in different structures, and that he duplicated those members, instead of using structure embedding. He then looked for a solution in interfaces, and naturally did not find it there. If so, he is at a very basic level of Go knowledge. Having dealt with complex Go codebases, I have never seen "code duplication"I think an appreciation for Go and the choices it makes can only be fully felt once you've spent a significant amount of time in another less expressive/convenient/simple language.
Actually writing it felt like a true dose of reality after such built-up expectations. It's... ok, I'd say I like it better or at least as much as any other static language, but damn it feels clunky at times. Specially the error handling; the `if err != nil {...}` everywhere is basically built-in verbosity and isn't very expressive.
I'm still happy to employ it for what it does well, but using it feels a lot like using Java circa 1997.
The language itself? Meh. Python/Haskell/C/LLVM IR cover my use cases. I see Go as another wrapper on top of LLVM IR when it is convenient and that is it.
[0] https://github.com/go-llvm/llgo [1] https://go.googlesource.com/gollvm/
Gofmt is for consistency for all devs to be on the same page, the format and structure is part of the language.
Are they complaining about the inheritance and generics, again did they learn Go? Stop thinking in about other languages when you are writing Go code, think the Go way.
Say I can make do with instances of my data structure for, I don't know, int8, int16, and strings.
Effective use of Golang is really teaching yourself to think that anything beyond the language is a useless distraction or some kind of academic pretension. I won't go so far as to call it S________ S_______, but this is textbook Blub.
- Write a messy formatted code - Run gofmt - Commit
Go appears to have all but monopolized most of the really exciting / modern Cloud Infrastructure open source projects, and from what I can tell it's going to be a joy to work with given the number of solid web frameworks that exist.
People who are undisciplined typically don't like discipline when they first encounter it. This doesn't restrict "Coding style" like the author suggests. Coding style and code format shouldn't be conflated.
2. Broken Package Management
It's not broken; it's intentionally limited. A "vendor" directory is natively supported by Go to account for this; use Glide or similar for more complex use-cases.
3. No Inheritance
It's a pattern of programming just like any other. In return you get first principles code and tiny lightning fast binaries.
4. Missing Generics
While I agree this isn't awesome, you can resolve this using Reflection.
5. Feature-Lacking HTTP Library
??? The author is missing the point of Go here entirely.
Thank you for the reply. Where can I learn more about that?
That said, I absolutely love go and wouldn't consider any other language for my development. I like the strict coding guidelines. Some of the things listed are bugs/issues that can be fixed in later releases (Feature-Lacking HTTP Library & Broken Package Management to be specific).
* have no changes to be made from Go 1.n other than backwards-incompatible ones, or
* would have no backwards-incompatible changes at all.
I get the feeling that the developers have learned a great deal about not making large breaking changes & segmenting the language.
The Go language accomplishes some amazing things so far, and it a pretty decent choice in the systems-programming space. Even if google dropped it, there would almost definitely be another company or group willing to be it's benevolent dictator(s).
Can't speak for Angular, but in Python land, ~9 years later, people are still cleaning up the fallout of the changes from Python 2 to Python 3.
It wouldn't bode too well for such a young language as Go to go through the same process.
My personal observations are that Go is gaining a lot of steam in many places. Announcing that they will break compatibility would make those places strongly reconsider their commitment to Go.
Umm, they've actually announced the opposite. Not sure why you say that.
As in, if in some hypothetical scenario, Google announced that they would break compatibility, it would be bad.
This is one of the better language features, IMO. No more maintaining massively complex inherited eslint rulesets. One style and you're done.
What project did you have in mind? What specific complaints did you see that made you think "this isn't a good fit"? And what did you pick instead?
In conclusion, I think you blog title is just making horrible attention.