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

Why is that better?


Familiarity and more importantly discoverability:

If you type a. in the REPL or IDE you should get a list of all functions applicable to the object


Familiarity changes rapidly in the world of software development. But I do agree about discoverability.

However, I think the issue is rather that we need to find new discoverability systems that work for multiple dispatch rather than limit our languages to single dispatch because we can't come up with better ways to achieve discoverability.

Maybe (a,b)f would be better syntax.. or we could start writing backwards ;) but now we're getting into seriously unfamiliar territory.

Multiple dispatch might actually be superior for discoverability when we get this right because you can filter the method list based on all arguments rather than just the first one.


Julia is not an OO language, and its functions dispatch on all function arguments, not just the first one.




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

Search: