For example, if jQuery were to define their trim() method as a prototype to
the String object, then it would/could override a pre-defined version of the
function. If the two functions did not behave *exactly* a like, now you have
some issue that's very hard to debug and track down.

I agree.  One of jQuery's strengths is that it plays well with other
libraries.  By keeping all of its code within the jQuery namespace it
respects existing utility extensions, but more importantly, it
protects its own.  For those that like to have access to utility
functions via object prototypes there are many  available in the
plugins/methods folder of SVN.

Mike

Reply via email to