Go puzzles me. It's slower than C/C++/Rust and GCed, so not really suited for performance critical stuff. No OO so not really suited for larger complex applications. So for smaller not-performance-critical programs, why not Python, Typescript etc? It seems that its popularity exceeds its scope, or am I missing something?
It's fast enough for most applications. Python and Typescript are unmaintanable. Everything around them breaks as the time goes by. I'd argue Python is not suitable for anything that spans more than one file or one week. I don't have enough experience wtih Typescript to hate it as much, but I know I spend most of my time fighting with the tooling. Again, unless you are writing a fresh application that is fine to thro…
Why people in Google hate Go?
71–80 of 144 posts
Re: Why people in Google hate Go?
#72I just did. Here are my top10 results:
https://en.wikipedia.org/wiki/Go_(programming_language)
https://de.wikipedia.org/wiki/Go_(Programmiersprache)
https://www.geeksforgeeks.org/go-programming-language-introd...
https://www.geeksforgeeks.org/go-programming-language-introd...
https://www.freecodecamp.org/news/what-is-go-programming-lan...
This continues down for dozens of results. Articles, Frameworks, Tutorials, Projects.
Re: Why people in Google hate Go?
#73I am not a functional programming fanatic, but I do appreciate all the functional constructs making their way into less esoteric languages. Such as map/reduce and in general working with immutables. Golang does not have this and it makes me feel like programming with only one hand. In particular when working with data and aggregations. I am prepared to be corrected, I have only looked briefly at golang, so I am happy…
I felt very similar when I started working in Go last year. Coming even from languages like Typescript and Python which are most definitely _not_ functional but do have some of the niceties like map/filter/reduce, I was missing it a lot in Go. What I also found was that there was a whole class of errors that I hadn't seen in years due to mutable state and poorly written for loops/ranges when compared to map/filter/re…
I am with you. Ever since working extensively with SQL for a while my go-to paradigm has been "programming without for-loops". It just magically removes the bugs.
The problem here, as you also hint, is that there will be a clash with the existing culture and codebase. And that may not be a small thing, even though you co-workers seem to treat you in a good way.
Re: Why people in Google hate Go?
#74Earlier quoted context omitted.
The same can be said about Rust: its popularity exceeds its scope, because 99% of applications I see that are written in Rust are better off written in a GCed language.
Except when you actually enjoy things being fast. For example, HTTPie easily adds 0.5-1s delay to every request because it's written in Python, especially on the first invocation. xh ( https://github.com/ducaale/xh ), on the other hand, starts immediately because it's written in Rust. I very much like this trend.
$ time http --version
3.2.2
real 0m0.113s
user 0m0.087s
sys 0m0.020s
$ time xh --version
xh 0.18.0
-native-tls +rustls
real 0m0.007s
user 0m0.002s
sys 0m0.002s
[0] https://httpie.io/blog/httpie-3.0.0#speed-upsRe: Why people in Google hate Go?
#75Earlier quoted context omitted.
Can you give an example of 'shitty code'? We've got murmurs of Go being adopted by some teams so if you have first hand experience it'd be really useful
Single letter variables. A terrible pattern the go community picks up.
Re: Why people in Google hate Go?
#76Earlier quoted context omitted.
The same can be said about Rust: its popularity exceeds its scope, because 99% of applications I see that are written in Rust are better off written in a GCed language.
Except when you actually enjoy things being fast. For example, HTTPie easily adds 0.5-1s delay to every request because it's written in Python, especially on the first invocation. xh ( https://github.com/ducaale/xh ), on the other hand, starts immediately because it's written in Rust. I very much like this trend.
At that time, this new Python language was a curiosity. It was nice that you could easily replace dozens of C code with one line of Python but everybody was aware it's too slow. However, this window shifted with time. The perceptions of "fast" and "slow" changed for various reasons such as network delays so Python became acceptable in many areas it would be dismissed otherwise. To the point it became the no. 1 language now.
But we are not in the 2000s anymore. We do have powerful, batteries-included languages that are faster than Python. So I expect with time, large parts will be rewritten. However, the area related to scientific computing will stay with Python, just like Fortran programs continue to be used today.
Re: Why people in Google hate Go?
#77Go is far from perfect, but I’m productive with it, it’s expressive enough that it’s both easy to write AND read, it’s performant enough, easy to build and deploy, and most importantly, it gets shit done. I don’t need more, but the Go team still delivers great updates every 6 months or so.
Re: Why people in Google hate Go?
#78Earlier quoted context omitted.
> A strong type system helps quite a lot with logic bugs actually. A static type system does, and all the languages that Rust has to compete with in its space, have one.
Go's type system is much less expressive and it has null pointers. An entire giant class of bugs.
Please, do explain: what does "much less expressive" mean, in technical terms? What specific data modeling can I not do in Go, and what specific bugs can be caused by that?
> and it has null pointers
Yes, so? De-Referencing a null pointer in Go crashes the program, making the bug very obvious. Go made the choice to have null pointers (which do exist in silica), and avoid the complexity of languages who pretend that null pointers don't exist.
It's a tradeoff, and a very good one at that.
Re: Why people in Google hate Go?
#79Earlier quoted context omitted.
Why does it need to be the best in one single metric when it can be great in many? It is an order of magnitude faster than Python. So it is well suited for performance in many cases. It is a lot easier to pick up than C/C++. So it is well suited for smaller programs. I can see Go as a very good middle-ground.
> It is a lot easier to pick up than C/C++. I would say, "it is a lot easier to pick up than C++" as the language specification is much smaller. I wouldn't be so sure about the comparison to C, though.
And please don't get me started on writing concurrent code in C.
Re: Why people in Google hate Go?
#80Earlier quoted context omitted.
Go's type system is much less expressive and it has null pointers. An entire giant class of bugs.
> Go's type system is much less expressive Please, do explain: what does "much less expressive" mean, in technical terms? What specific data modeling can I not do in Go, and what specific bugs can be caused by that? > and it has null pointers Yes, so? De-Referencing a null pointer in Go crashes the program, making the bug very obvious. Go made the choice to have null pointers (which do exist in silica), and avoid the…
You're getting into the Turing tar-pit. There's nothing you can do in Rust you can't also do in Go, technically. Hell, you can do it all in Brainfuck too, if you so desire.
The big thing, though, is ADTs. Being able to say "the value is one of 3 possible values" is a lot easier than saying "here are three values, you should use the non-zero one".