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

Well, every external call is 'coupling' in your code. Whether it happens on an interface passed as an argument or by resolving the name in some other fashion doesn't really change how tightly coupled your code is.

To me, having to change a function into a method on a singleton interface just to be able to mock it for tests seems like working around inadequacies of the language. And I'm not sure why `module.Interface.method` is easier to read than `module.function`.



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

Search: