logoalt Hacker News

skybrianyesterday at 3:25 PM3 repliesview on HN

What could you do with row polymorphism that you couldn’t do with generic functions that take slices in Go?


Replies

tinesyesterday at 3:35 PM

I think Go interfaces are row-polymorphic aren't they? I'm also wondering what the difference between row-polymorphism and ad-hoc polymorphism (a la C++ templates) is.

show 1 reply
aatd86yesterday at 4:30 PM

When you want to abstract on structs "having" a given field (by name) of a given type, I think. Although that may come in Go at some point.

show 1 reply
ryandvyesterday at 4:03 PM

[flagged]

show 2 replies