>The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.
- Rob Pike
lionkor•9h ago
So they made it easy to have data races in a language all about concurrency, bravo. Not buying it.
tyre•8h ago
sorry is the point here that enums are too complicated to understand?
pjmlp•2h ago
Apparently, like most modern language features in the last 50 years or so.
nsingh2•9h ago
Go seems like such a strange language to me. I like its simple syntax, but it's strange that they compromised and added generics to the language but balk at basic things like sum types, pattern matching and type safe enums. Their simplicity design philosophy seems a bit incoherent.
lionkor•9h ago
They might be trying to do another C, that is so simple that it will be ubiquitous? They're failing to understand that C would never take off it invented today. Go is nowhere on my list of languages I would use - there is simply nothing it's great at. Serialization/deserialization? Rust. Multithreading? Rust. Low level high performance stuff? C, Zig. Quick scripts? Bash, python, JavaScript, Rust. Really fast concurrency? C++ or Rust. Web servers and services? Either nodejs, something static on an existing webserver, or rust for backends.
I completely fail to see where Go excels. Large, statically linked binaries that aren't even concurrency safe...? Really? No enums? Odd syntax (I like Rust, C++ and Haskell, I find Go's syntax odd still).
Like so many Google products, it solves a problem that nobody I know has. And I guess they can afford concurrency bugs, who cares, its only a language primarily for concurrency.
tacitusarc•8h ago
Have you used Go? Most of your criticisms are, in my experience, incorrect. But ultimately there are tradeoffs, and Go seems to be a divisive language.
In my experience, Go excels at pushing you towards solving the problem rather than yak shaving. And in my opinion that is worth it’s relatively minor frustrations.
ironmagma•8h ago
Compilation time is fast, and it’s debuggable. Typescript would be the main competitor in my mind, but compilation with TS is slow and you have no parallelism without native extensions.
sambeau•7h ago
Go is a tiny language. I can easily hold it all in my head. I don't think I can say that about any other language I've used. Not even C.
homebrewer•7h ago
It is a passable replacement for CLI utilities (so basically Python or bash) thanks to the rich ecosystem, easy cross-compilation, and static linking, which makes deploying the result easy while also avoiding the horrible mess and pain of handling Python dependencies, or remembering dozens of tiny incompatibilities between various flavors of UNIX utilities.
Unlike Rust, one is not required to have three digit IQ to use the language, so that's why I've been using it where previously I would have resorted to Python (and then either copy venvs around, or write packages for my packages to ship dependencies of my dependencies).
I too fail to see why would anybody use it for anything else, especially compilers or more complicated server stuff where you really benefit from having a proper type system, but people do, so I must be missing something...
za3faran•6h ago
It's a better Python, that's where I see most of the real world use cases. After dealing with Python for a while now, I would take golang any day of the week lol. But for backend systems, there are far superior alternatives.
flkenosad•5h ago
It's great for large software projects that need tons of random contributers. For example, Gitea.
pjmlp•2h ago
C is only simple in theory.
Yasuraka•1h ago
> Web servers and services?
That's it, mostly. CRUD is also a huge part of the industry, unlike "Serialization/deserialization", which are a means to an end.
> Either nodejs, something static on an existing webserver, or rust for backends.
Horrendous choices, I daresay.
Why do people use Java and C# ?
JyB•7h ago
The generics addition is extremely incoherent indeed. Makes sense why there was a lot of push back.
hfgjbcgjbvg•5h ago
They never should’ve done it but the way they did do it is the best way they could’ve done it.
o11c•9h ago
To be fair, enums represent a different and incompatible concept in every language I know.
It's possible to support everybody's needs in a single language, but I'm not aware of any language that has done it yet.
bsaul•9h ago
"enums represent a different and incompatible concept in every language I know."
Enums has always felt very natural in every modern languages i've tried (swift and rust, for example), even with associated values. The underlying "sum type" concept also is very intuitive, and seems very complementary to structs for example.
Can you expand a bit on what you mean ?
__s•8h ago
Sum types are cool. Many languages implement enums which are not tagged union sum types (even when language has rich sum types)
This. I find Swift and Rust enums, which are indeed very similar, to be incredibly good at modelling the real world. For example the standard geospatial vector types which are heterogeneous and even recursive in the case of GeometryCollections can be modelled and operated upon very cleanly.
za3faran•6h ago
Have you tried them in Java?
protolyticmind•2h ago
Rust has IMHO the best implementation of enums ... Mixed with match it is super powerful
ikiris•6h ago
it kind of does and doesn't
saghm•5h ago
I'm not sure what you mean by this. It definitely doesn't have enums, not even in the C sense of "type alias for integers with names for specific constant values. Yes, it has iota, but that's orthogonal to enums; you could use it to define bitmasks, for example. While you can certainly use it in combination with a type alias to make something resembling an enum, I'd argue that's still not actually "having enums"; you could do the same thing in C with typedefs and constants even if it didn't have enums.
lionkor•10h ago
HideousKojima•9h ago
- Rob Pike
lionkor•9h ago
tyre•8h ago
pjmlp•2h ago
nsingh2•9h ago
lionkor•9h ago
I completely fail to see where Go excels. Large, statically linked binaries that aren't even concurrency safe...? Really? No enums? Odd syntax (I like Rust, C++ and Haskell, I find Go's syntax odd still).
Like so many Google products, it solves a problem that nobody I know has. And I guess they can afford concurrency bugs, who cares, its only a language primarily for concurrency.
tacitusarc•8h ago
In my experience, Go excels at pushing you towards solving the problem rather than yak shaving. And in my opinion that is worth it’s relatively minor frustrations.
ironmagma•8h ago
sambeau•7h ago
homebrewer•7h ago
Unlike Rust, one is not required to have three digit IQ to use the language, so that's why I've been using it where previously I would have resorted to Python (and then either copy venvs around, or write packages for my packages to ship dependencies of my dependencies).
I too fail to see why would anybody use it for anything else, especially compilers or more complicated server stuff where you really benefit from having a proper type system, but people do, so I must be missing something...
za3faran•6h ago
flkenosad•5h ago
pjmlp•2h ago
Yasuraka•1h ago
That's it, mostly. CRUD is also a huge part of the industry, unlike "Serialization/deserialization", which are a means to an end.
> Either nodejs, something static on an existing webserver, or rust for backends.
Horrendous choices, I daresay.
Why do people use Java and C# ?
JyB•7h ago
hfgjbcgjbvg•5h ago
o11c•9h ago
It's possible to support everybody's needs in a single language, but I'm not aware of any language that has done it yet.
bsaul•9h ago
Enums has always felt very natural in every modern languages i've tried (swift and rust, for example), even with associated values. The underlying "sum type" concept also is very intuitive, and seems very complementary to structs for example.
Can you expand a bit on what you mean ?
__s•8h ago
https://en.cppreference.com/w/c/language/enum
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...
https://docs.python.org/3/library/enum.html
https://api.rubyonrails.org/v5.2.4.5/classes/ActiveRecord/En... https://sorbet.org/docs/tenum
https://docs.oracle.com/javase/tutorial/java/javaOO/enum.htm...
https://dart.dev/language/enums
https://www.postgresql.org/docs/current/datatype-enum.html
https://dev.mysql.com/doc/refman/8.4/en/enum.html
https://zig.guide/language-basics/enums
https://www.erlang.org/eeps/eep-0013
https://hackage.haskell.org/package/planet-mitchell-0.1.0/do...
https://www.ibm.com/docs/en/openxl-fortran-aix/17.1.1?topic=...
willtemperley•7h ago
za3faran•6h ago
protolyticmind•2h ago
ikiris•6h ago
saghm•5h ago