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

Probably a lot like Clojure's protocols, which are precisely that. Effectively, functions declared in a protocol are just lookup tables that resolve to a particular implementation based on an object's type at runtime. You can query a value at runtime for whether it implements a protocol, too.



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

Search: