DEV Community

Discussion on: GOlang discussion 🤔

Collapse
 
rsa profile image
Ranieri Althoff • Edited

Go ranks as bad as PHP and slightly worse than Java. That's the worst position on my personal rank.

I miss virtually anything that makes a language productive:

  • generics (no, interface{} is not generics, it's just garbage)
  • error handling (also no, that crap is NOT error handling)
  • even the most basic utility functions (nothing for ints in math? wtf)
  • you can't assign a fixed-length array to a dynamic-length one
  • namespaces. the "package" thing is terrible
  • there are no constants. const is a compile time value, not a runtime constant.

Also, it's all buggy/incomplete:

  • fmt.Print and fmt.Println differ in how they concatenate args
  • log.Print and log.Println BOTH break line at the end - the difference is concatenating args, like above
  • there's special syntax to handle maps and lists that is not available anywhere else in the language
  • converting between primitive types and between structs is a completely different syntax
  • sync package has a thread-safe map (nice), but does not have a list (why?)
  • there are 2 pieces of code to handle URL punycodes (yes, it's repeated), but NONE are exported - you need an external package for a piece of code that is already in the standard library

All things considered, it's just waste of sanity. Just use Python or JS, and when you need the speed, use C++ or Rust.

Collapse
 
eichgi profile image
Hiram

Awesome, this is also the kind of comments that helps to learn. Despite what you dislike, would you use it anyway because of the good performance?

Collapse
 
rsa profile image
Ranieri Althoff

No, if I needed good performance I would use C++, no garbage-collected language would be proper in this field. If I need a massive level of concurrency, I would probably use Javascript (with Node) or Elixir.

Maybe there are some edge cases where they aren't as performant as Go, but productivity wins by a lot here.