Hacker News new | past | comments | ask | show | jobs | submit login

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.




> embedding [..] never feel quite right.

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.


Almost every single case of embedding I've encountered was buggy in some way.

Explicit composition is much more reliable.


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.


Autogenerating delegation is bad for the same reason. Having to explicitly delegate in every single case forces you to think about it.

Alternatively, it forces you to use the type system to make a better abstraction.


> forces you to think about it

forcing people to type something never forces them to think about it.


As someone that also has to wear DevOps hat, I really would like that Rust had matured first.

At least newer CNCF projects aren't going into Go as much as they previously did.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: