Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not the same, because with an interface, the methods defined for the struct must match the interface.

With type classes you can bridge that gap because the implementation of the struct for a specific type class can be defined anywhere.



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

Search: