News for hackers. Stuff that matters.
Re:A Rust Contributor Tries Their Hand at Go by tptacek on Tuesday April 28, 2015 @05:20PM (#9455235)
This by the way is a theme with Golang: Golang's answer to insufficiency in its ability to model problems is virtually always a pragmatic reframing of the problem without all the modeling.

You can see this through the lens of i.e. Peter Norvig writing a Sudoku solver vs. that object modeling guy, or you can look at it through the lens of "the language should capture problems as safely and completely as possible".

You can take either perspective too far.

When Pike suggests implementing generics with "go generate", I feel like he's taking it too far. Here, I think maybe we're too far the other direction.

Re:A Rust Contributor Tries Their Hand at Go by pcwalton on Tuesday April 28, 2015 @05:43PM (#9455319)
> Here, I think maybe we're too far the other direction.

We have at least three examples of this being an actual problem in practice that could not be worked around. Two in Java, and one in Golang itself. I don't know how you can come to the conclusion you did.

In particular, "struct composition" does not solve the problem any more than inheritance would in Java. This comes up in cases in which the structs in question have separate declarations and you don't want to force all of your method's callers to inherit from your class/embed your struct just to call your function.

Re:A Rust Contributor Tries Their Hand at Go by tptacek on Tuesday April 28, 2015 @06:44PM (#9455547)
I think the objection is that you rule out workarounds that involve rethinking decisions about what should be a struct, what should be an interface, and what things should be named.