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

You may be confusing abstraction and indirection. Of course writing large software is hard, and of course we want to make it easier. The real question is whether we want to do it the same way in Javascript that we did in Java, and the answer's probably no.

Also, a large codebase can be very easily maintainable with tightly coupled components. The only reason you would want to loosely couple them is if you have a reasonable belief that you might want to swap out the implementation at some point, and even then you can usually do it fairly transparently by adding the indirection when it comes to it.



> Also, a large codebase can be very easily maintainable with tightly coupled components

Agreed, but having worked on large codebases it's usually easier to plan ahead and decouple from the start - it can be hard to decouple components later when you didn't plan for it. It's also much easier to properly unit test when you can trivially inject a mock.

Of course this is only relevant if you're building a large project. The typical web app just doesn't need it.




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

Search: