Relative Content

Tag Archive for prototyping

Can/should objects share methods in certain circumstances?

I am currently working on a web application that is supposed to resemble an operating system with GUI (it manages processes and windows). I have several constructors which deal with different aspects of the program, such as Process and Window. There are a few built-in programs which use a special API and a utility function to extend Process and add certain methods to the prototype.

Why is extending the DOM/built-in object prototypes a bad idea?

I’m looking for a definitive answer to why extending built-in prototypes is so heavily chastised in the JS developer community. I’ve been using the Prototype JS framework for a while, and to me doing [1,2,3].each(doStuff) seems much more elegant than $.each([1,2,3], doStuff). I know that it creates “namespace pollution,” but I stil don’t understand why it’s considered to be a bad thing. Also is there any real performance degradation associated with extending built-in prototypes? Thanks!

Why is extending the DOM/built-in object prototypes a bad idea?

I’m looking for a definitive answer to why extending built-in prototypes is so heavily chastised in the JS developer community. I’ve been using the Prototype JS framework for a while, and to me doing [1,2,3].each(doStuff) seems much more elegant than $.each([1,2,3], doStuff). I know that it creates “namespace pollution,” but I stil don’t understand why it’s considered to be a bad thing. Also is there any real performance degradation associated with extending built-in prototypes? Thanks!

Why is extending the DOM/built-in object prototypes a bad idea?

I’m looking for a definitive answer to why extending built-in prototypes is so heavily chastised in the JS developer community. I’ve been using the Prototype JS framework for a while, and to me doing [1,2,3].each(doStuff) seems much more elegant than $.each([1,2,3], doStuff). I know that it creates “namespace pollution,” but I stil don’t understand why it’s considered to be a bad thing. Also is there any real performance degradation associated with extending built-in prototypes? Thanks!

Why is extending the DOM/built-in object prototypes a bad idea?

I’m looking for a definitive answer to why extending built-in prototypes is so heavily chastised in the JS developer community. I’ve been using the Prototype JS framework for a while, and to me doing [1,2,3].each(doStuff) seems much more elegant than $.each([1,2,3], doStuff). I know that it creates “namespace pollution,” but I stil don’t understand why it’s considered to be a bad thing. Also is there any real performance degradation associated with extending built-in prototypes? Thanks!