71 points · by psxuaw · 2y ago · 34 comments
Go is targeted at system programming, which is a domain in which you need pretty advanced developers. But the language feature seems to favor use by absolute programming beginners. It's a trade-off which seems somehow inverted.
Is it actually intended for systems programming? Its main (and intended) use seems to be a faster and better at concurrency and parallelism alternative to Python, Ruby etc.
> Although we expected C++ programmers to see Go as an alternative, instead most Go programmers come from languages like Python and Ruby. Very few come from C++.
https://commandcenter.blogspot.com/2012/06/less-is-exponenti...
So I think the motivation was more implementation simplicity . But if they had tried to add zero cost iterators it probably would have leaked complexity into the language too.
But as someone who has done a ton of functional programming, to me it is just too conservative of a language. There actually has been progress in the PL space the past 50 years, and I personally prefer a language that includes them.
I think OCaml strikes a better balance between power and simplicity, it is probably the closest to Go in the functional programming space (and is also a systems language). It has a blazingly fast compiler, it's easy to understand how it executes things, compiles down to a single binary, the tooling is good. Very similar advantages to Go.
When you introduce lambdas/closures/HOF you immediately have to think about scope rules, non-local references etc.
Meanwhile, a foor loop is just a for loop.
(It doesn't bother me, just noting the same complexities do come up pretty often).
I haven’t checked whether any Go compiler does list fusion between producers and consumers (to avoid leaving a slice in the heap after reading it just once).
For map, reduce etc it's not in the stdlib yet, but you can use https://pkg.go.dev/github.com/samber/lo
The most common complaint against Go seems to be "My favourite programming language has X, why doesn't Go has X??"
There are things I would like to see in Go (e.g. real enums and the ? operator for error handling), but I DONT WANT Go to become a copy of C# or Haskell...
So, this cite applies to Go: “Everything should be made as simple as possible, but no simpler.”
The reason it took me a long time to learn Java is because when I started learning Java there was a certain way to architect Java systems. And to be frank, the way Java was done in the 90s was horrible. Lots of complex boilerplate, lots of structure and none of it seemed to pay off. And on top of that, most people still didn't understand OO all that well so you'd get layer violations and strong coupling all over the place. Making code really hard to maintain. (I used to ask people to read the first part of the GOF book, and forget about the rest of the book. Because at that point, the introduction contained the best explanation of OO we had found. It is probably still worth reading. Though the rest of the book led to a lot of silly dogmatism where some people suddenly behaved as if the patterns were the only allowable design strategies)
Then came the 00s with people adopting huge frameworks that in themselves took a lot of time to learn and, again, didn't produce the results we wanted. Worse yet, applications became hostages to these frameworks. Ever been faced with a few hundred thousand lines of code trapped inside a Spring-dictated architecture. That's really, really expensive to do something about.
It took a really long time to figure out a good way to do software in Java. It also took a very long time to re-train Java developers whenever we got a new hire. To teach them anything from "microdesign" (how you express things in Java) to how you design, plan and architect stuff without ending up with a lot of
The way Arch Linux defines simplicity is "Arch Linux defines simplicity as without unnecessary additions or modifications."[0]
Go is simple because it only really has what you NEED. People complain about wanting this and that feature, but they don't really NEED it, it would just make writing code easier.
Personally I love that because if there's a billion ways to do something, I waste all my time trying to figure out the best way to do it instead of working on the original problem, but I can see why people who are not like me would prefer more features.
I think it's more like a Lisp than Go.
I would say that the biggest concern with delete_at is if you are using it inside another O(n) loop, then it becomes O(n^2) which does scale up fast enough to become a performance issue.
Big-O just tells you how something scales. It doesn't really tell you how fast something is.
Google says that only since Feb 2022, and the article was written in 2021, but I think it was a planned feature and if the author did some research, he'd realize that generics are coming.
I much prefer the pre generics Go. Crisp and compact.
Go is like Prostaff 90 upgrade to the great PS 85. It is not the plasticky Babolat APD 100 that beginners love.