Wait, Go seems to support Generics, lol: https://go.dev/blog/intro-generics
I think I confused Generics with function overloading. This is what Golang does not support. But I was able to deal with it. Was just unexpected but not that big of a deal in the end.
After coding in C/C++ for 5+ years, I loved golang (I was a go maxi for ~3 years).
But if you are trying to build software that solves problems not requiring statically typed and compiled code, you can produce solutions faster in more expressive languages eg js.
Coming from a golang background is one reason why I'm so excited about the Deno runtime ... It lets me use the most popular expressive programming language (js) with a golang-like package management system and can produce standalone binaries like golang. It's not ready for primetime yet, but it'll get there.
tbh if I could have my way, I'd prefer to program in a Lisp dialect ... it doesn't get more expressive than ad hoc DSLs.
reply
Go has interfaces. There's no need to complicate a language with more than one effective way to do things. You can mimic much of the behaviour of variants and generics with interfaces. And the interfaces available in Go since 1.18 are a pretty slim set and don't include any structured types. You can do signed/unsigned/float and you can do arrays (predefined size) but that's it, at least if I have grasped it correctly.
Easy way to remember if Go has a feature: is there a simpler way to do it? Ok, no. No map/reduce/filter or complex iterators, no generics, no objects, the slice and map are naked and barely cloaked pointer types that make for some racy fun with goroutines.
reply