by zer8k · 3y ago · 0 comments
That's the problem with Go in general I think. Much like my experience with Ruby on Rails it seems like once you want to go venture outside the safety of the walled garden you can't. The language is specifically designed to keep you as safe as possible. Great for bottom-tier devs and unmotivated people working on corporate TPS reports. Bad for the motivated engineer. Opportunities like this (to introduce a new idea into the go concurrency ecosystem) are basically impossible.
> Bad for the motivated engineer.
Sounds to me like it's really just bad for the engineer who wants to show off how smart they are through the overcomplicated custom abstractions they build.
Condescending response to condescending comment aside, I understand that those custom abstractions can occasionally be great and have their place, but in practice their value usually starts reversing (yes, reversing, not diminishing) once you need to onboard many engineers frequently (junior or senior alike), which is the case for a big part of tech projects (think big tech, high growth startups, but also open source projects where you want first-time contributors to be able to dive in and solve their issue quickly).
And I'm saying this as a motivated engineer who loves playing with various languages but uses Go for most serious things.
(Funny aside - somehow, Google managed to turn Rust into abstraction hell: https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/s...)
Learning how to express oneself consistently and with no more fluff than is strictly needed is much harder than people think. I admire people who can solve complex problems by simple means. I'm not terribly impressed by people whose obsessions drive them to write code with low readability.
What features does Java have, and Go lack, which represent a real problem? With emphasis on the word "real".
Checked exceptions offer stronger guarantees of error handling.
Generics (something they did add to Go after years) let you build reusable methods without relying on a ton of boilerplate.
None of these features cause the indigestibility of the bloated Java frameworks.
It's usefulness for producing something that works well quickly is great. The second you want to take some time to explore it simply punches you in the face and sends you to the back of the line. In some sense, I guess, Go just offends me.
Your comment is very general, and doesn't make much sense - Go is just fine for prototyping.
If you mean PL research and being able to experiment with custom methods of abstraction and DSLs then yes, indeed, there's not much to do. Which, as I mentioned above, is a feature in most cases.
It's good for the motivated engineer, because instead of running off and creating architecture astronautical wonders of over-engineering, they are getting down to business and making progress to a goal.
Your bottom-tier engineers aren't going to be any better in Go than they are going to be in Java.
Maybe in theory, in practice you get people writing their own implementation of generics with codegen and Canadian aboriginal syllabics…
Another famous example is how k8s, dealt with the lack of generics: https://medium.com/@arschles/go-experience-report-generics-i...
Up to a point, depending on the limitation.
After all, writing raw assembly removes almost all limitations and yet people still argue for introducing limitations in higher level languages.
Static typing is a limitation, and yet more people argue for it than against it.
Structured control is a limitation, and yet people prefer that to raw `goto`s.
Lack raw memory access is a limitation, and yet people argue against raw memory access in favour of alternatives (such as byte arrays).
Top-tier engineers don't feel constrained by static typing, structured program controls, raw memory access or any one of the multitudes of limitations that popular languages define as their "walled garden".
There's no clear line marking the boundary between a constraint that is helpful and one that is not. It's more of a gradual spectrum with assembly on one side and Lisp on the other, and all other languages somewhere in between.
I'm largely in agreement that a language that prevents the programmer doing stupid things also prevents them doing clever things, but I feel that certain particular limitations improve the maintainability and readability of code.
Those languages that have a kitchen-sink approach to features are notoriously for being difficult to maintain. Most large C++ projects, for example, literally have a defined subset of C++ that they will approve in PRs, and they are still considered difficult to maintain.
IMHO (really emphasising the "humble" in that acronym), and as someone who's playing around designing a language (again!), a good language these days should be defined by what it doesn't let you do, not what it lets you do.
Lets you pick one of three different ways to declare a function? Bad Language! No cookie for you
A function declaration always looks the same no matter where it appears? Good! That's a limitation I actually want!
The thing about Java is that idiomatic Java should be like the Java standard library, instead of being like J2EE and Spring Boot.
Could you provide us with some concrete examples? At the very least so it is possible to determine if you are trying to do something that Go clearly isn't suited for.
I personally find myself choosing go because I feel I am way more productive with the language. By keeping me constrained, I have less choices to make on how I solve the problem, and focus more on solving the problem.
What's the issue with making Go good for the lowest common denominator developer? This is fantastic for businesses as they can get new developers productive within a few days. It's great for the ecosystem because the barrier of entry is low.
Just because it's made simple and easy to pick up doesn't mean you can't write complex software with it. It's a programming language, you can write whatever you want with it. If it makes writing complex software easier, then that's a good thing. The only reason why someone would think that's not a good thing is their ego because $FAVOURITE_LANGUAGE has 10x as many language features and 10x as many ways to do the exact same thing.
What is this walled garden you think exists that prevents motivated engineers from doing good work? I like to think of myself as motivated and Go is the reason for that. It made writing complicated concurrent software so much easier for me, and it made reasoning about them so much easier. I do not understand this criticism of Go.
Compare say Java 5 code written with raw servlets implementations and JDBC calls versus modern Spring code. The implementation of the former is easier to understand because everything is very explicit, but the intent of the latter is far easier to understand, since the boilerplate is mostly gone, allowing the actual business logic (what you care about 90% of the time) to be obvious. And you can of course see the implementation if you need to
Simplicity is much harder than complexity. Anyone can add and anyone can subtract recklessly, but it takes genius to subtract without losing too much in the process. The genius is in identifying the essential complexity in a problem and finding ways to dispense with incidental complexity.
I've personally been using Rust more lately for various reasons, but I really do like Go and think its choices are excellent for its niche. In any case simplicity can be practiced in any language by choosing the most straightforward way to achieve things and avoiding over-engineering. Rust has a lot of features and paradigms but I can be productive in it by remembering that just because it's there doesn't mean you always have to use it.
The problem with kitchen sink languages is that someone on the team will use a feature you don't know about.
If enough people on a big enough team do that the project inexorably moves towards the most complex representation of any idea.
On solo projects, some of the most complex languages can be used by effectively by a newcomer. On any other project with the same stack, you need to add in significant ramp up time.
There are two main competing fallacies in developer culture: the first one is that complexity is a good thing, the second one is that complexity can be avoided.
They are both equally wrong, complexity is a curse, but that's the curse of the real world and if you try to hide that under a rug and call that “simplicity”, then everybody is gonna have a bad time. This blog post is a good dicussion on that topic:
https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-...
Abstraction is the only way we can combat complexity (and as mentioned, most of that complexity is essential that can’t be reduced further), so if a given language sucks at it, it sucks.
If one could hypothetically rewrite the whole stack from the ground up with a 100% consistent set of APIs, interoperability standards, protocols, naming conventions, etc. and only one implementation of each core function, there would be an absolutely massive reduction in code size and complexity.
Not that you could do this in the real world since the labor and cognitive load required would be astronomical, but consider it as a thought experiment.
I have wondered if in the long term AI LLMs might be a way out. I wonder if a suitably powerful code-comprehending LLM (much better than current ones) could do what I just described.
"Here is the source code to an entire Linux distribution with all its applications. Re-implement this entire code base in language X while preserving all functionality with a consistent style, minimal code reuse, maximum parsimony, and maximum performance. Omit all functions and abstractions not required to achieve the objective of each software package or interface..."
(Three months and 10,000 GPUs later...)
Abstraction just hides existing complexity and adds another layer of complexity.
Using a FactoryFactoryFactory isn't going to eliminate complexity.
And he didn't say lowest common denominator developer, he said something like junior Google developer.
And IIRC he said it somewhere in his blog, called command-central.blogspot.com or some such.
Less is exponentially more:
https://commandcenter.blogspot.com/2012/06/less-is-exponenti...
It is not a problem that Go manages more developers to perform well. It is a clear advantage. Thinking it is a problem says something about lack of maturity.
He went to a previous commit from the one I had linked, saw my stupid attempt at estimating it, and proceeded to go on a rant in which he simultaneously called me an idiot and pointed to the answers in the runtime code. Pretty entertaining.
Of course, the code was stupid because I wrote it knowingly so, just so I could fill the function with compilable code and go debug something else. I guess not writing a comment is on me for not knowing Rob Pike was going to go out of his way to find it the next day.
Fun day at the office, that one. So yeah, I am not the greatest fan of Go or him either. But that was from way before when I had to write a JSON-LD parsing library and cast stuff to `interface{}` everywhere.
I write personal stuff in Rust now, but would happily do it in any other language with a proper toolchain and type system. Go has only one of those, so I don't dislike it. Just don't really enjoy it.
I agree that it’s not meant to be condescending.
Go is very much AT&T Limbo from plan 9, with loose ends wrapped up and refined on Google’s dime, since Google brought Bell Labs people and their projects to Google, and the quote is therefore a purposefully misleading retrofitting of a history and design predating any concern about noob hires at Google.
Garbage collection is another such example. Compare that to e.g. rust's model which hoists the understanding of lifetime to the engineer, while encumbering the compiler with the dirty work. Whereas golang asks the engineer to do neither (granted golang came later, so maybe they didn't think it was possible).
I disagree, if you don't think engineers can be trusted, you wouldn't want to trust engineers to remember to close files or connections, you'd have some language feature to do that automatically.
C++ and Rust solved this with RAII and destructors.
In my opinion, this is on the same level as "just remember to check bounds" or "just remember to free memory".
Esp. closures, which Go uses a lot all over the place, are quite cumbersome in Rust.
(I like both languages a lot)
Rust uses closures very heavily, for things like iterators, spawning threads, async tasks, and lots of other things. I've never felt them to be cumbersome at all.
Actually, for me, closures in rust are easier to use than in any other language I have used besides for various lisps!
Having spent ~2 decades working with engineers, I'm inclined to agree... Past, present, and future self included!
Would I recommend Go to someone as a first language? Absolutely not. Would I professionally recommend Go to a company in order to lower the skill ceiling to floor, keep seniors+ in check, and keep juniors safe? Yes. That is all it is good at. Everything else it offers another language does better.
I have about a decade and a half of experience as a software engineer. In almost every case, over a long enough time period, a centrally dictated constrained system is almost never ideal. I've ported more companies off Ruby on Rails onto something sensible than I can keep count of. I imagine I will be able to charge $150/hr to do that for companies who bought into Go in about 10 years as well. Once you need to reach outside that box to do a very bespoke task your company needs you're stuck. With RoR I found this to be the case with ActiveRecord. With Golang I imagine it'll either be the concurrency model or the stiff parameters for nearly every aspect of the language. My present company is already at that stage. Their answer was to build around it. So now we have a hodge-podge of tooling in a couple languages and all benefits of a centrally governed language have gone out the window.
These days I generally recommend most people run Python as it seems the most future proof. I've also recommended a few companies move back to Java due to constraints Python could not solve for.
Since I'm probably very average, I'd rather be safe from having to deal with the mess left by bellow average work. So for me it goes Go for work, and a lot of Forth, Lisp (Scheme and Racket mostly), Elixir/Erlang on my own time. Whatever doesn't need to touch other people's work can be malleable as possible. If it gets publicly pawed at, I need carbon steel rails thank you very much.
Further, the idea that Go is somehow bad for motivated engineers doesn’t match my experience and it doesn’t explain the proliferation of interesting tools and services (much of the container / devops ecosystem). I think your mistake is assuming that the only kind of motivation/creativity/etc involves tinkering with language runtimes and that someone who is building original things like Docker, Terraform, or Kubernetes must be “unmotivated”.