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

Instead of starting with methods, start from interfaces. An interface is an object along with a collection of functions that have the same object as one of their parameters. It's a whole lot easier to implement if that special parameter is always in the same position.

Methods are useful for implementing interfaces and for avoiding namespace clutter; otherwise they're equivalent to functions.

I have no idea how you get from multimethods to interfaces.




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

Search: