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

Nice! That's something I like about Haskell and Elixir: the ability to define behavior for a given case. Though it looks like that's constrained to type-based dispatch (a la Java method overloading). Is there any way to define for specific values?


If I read this article properly, there's nothing yet standardized, but there's a possibility of future development: http://lukasz.langa.pl/8/single-dispatch-generic-functions/.




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

Search: