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

There is a large difference between dogmatically declaring that every single service needs an interface, versus just introducing them at the point where you actually need more than one implementation.

I think that's the author's original argument - not that interfaces are bad in of themselves, but that cargo culting is problematic.

Furthermore, starting with an interface oftentimes makes you create the wrong abstraction, however when you have a concrete implementation, in my experience extracting an interface becomes easier to do, though mostly thanks to excellent IDE tooling.



Exactly, it would've made total sense to pull it out into an interface in other situations, but simply felt like a preference here.




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

Search: