That's called encapsulation. :)
Seriously, encapsulating complexity is the foundation of most programming paradigms.
That's called encapsulation. :)
Seriously, encapsulating complexity is the foundation of most programming paradigms.
Encapsulation/abstraction should really be a tool of last resort. From experience, it doesn't actually help reduce complexity if overused, but just makes it hidden and more likely to surprise you when you're debugging.
Does jQuery (est. 2006) have more bugs in it than your code?
jQuery's not a very good example of this though. It's one of the most widely used, and hence most tested and least buggy pieces of software out there. Nowadays the web APIs are pretty solid, but back in the IE6/7/8 days the jQuery API was a lot less buggy than using the built in APIs directly.
To me this seems a comment that only stands for one-developer projects.
https://en.wikipedia.org/wiki/Encapsulation_(computer_progra...