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

He's talking about the inability to specify an interface that specifies functions that take two arguments of the same type. Go can't do that.

You can sometimes work around it. For instance consider sorting. The natural approach is to specify a type that allows comparisons. Go can't do that. But in go you can have a collection which has a function Less(i, j int) bool that takes in two integers and compares the objects at those positions (which in turn just happen to be of the same type).

But this is a limited work around, and there are plenty of cases where you can want something more flexible.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: