Yup. I love Go but they didn’t get types right. The level of abstraction is too low, and embedding and iota never feel quite right.
Rust got the basics right. Pattern matching, no nulls, traits, sum types, and the sugar around try with the ?-notation is also great.
Despite it all, this is not a dealbreaker, and Go shines for striking a great balance of a sensical language. But I always cringe a little inside when fanboys defend even the most awkward and annoying aspects of Go.
funnily enough, I would argue that struct embedding is one of the things that Go actually got right. It's simple and elegant, and I think it could've been a useful addition to Rust.
Yeah to be fair I don’t think I even have a problem with embedding per se. It’s quite nice. It’s more the fact that embedding can be used to work around missing type system features. I can’t recall exactly, but I remember using embedding for things that it probably wasn’t designed for, because it would save me a ton of boilerplate.
If someone autogenerates one way or another all the delgation, then that's just as buggy as embedding. The presence of all the explicit composition in the codebase doesn't mean that anyone actually sat down and thought about it all.
Also a reason why Golang isn't viable for DS/ML. I have 6 years of experience in Go, and I thought it would be easy to implement a PyTorch like library in a weekend, I had done so with Python and Julia previously. Go's lack of sum types is a huge restriction, once you hit this wall you realize it's the reason for a lot of wacky workaround in various libraries (especially any parsing libraries!)