DEV Community

Discussion on: Golang for Experienced Developers

bastianrob profile image

TBH I've had my share of probelm with absence of generic in go too.

Oftentimes find myself cooy pasting another part of my code with same functionality but different type.

But go is simply too simple and too opinionated. Everybody's codestyle are roughly the same and it's super easy to pick up on go projects codebase than, say, JavaScript.

Thread Thread
leob profile image
leob • Edited on

Exactly! You end up copy/pasting and rewriting loops endlessly, because there are no Generics.

I think it's a good thing that Go is simple, that's the philosophy of the language and they should stick to it. I've also looked at Rust, and it's brilliant but it is HARD.

But, they should REALLY consider adding generics to Go ... if they're allowed to add one and only one thing to the language, generics it should be.

Thread Thread
livesamarthgupta profile image
Samarth Gupta Author

I guess generics are on their way in Go. Check

Thread Thread
leob profile image

Yeah I heard they were working on it, great to see that it's coming!