W
wilq
Hello Experts,
I got a question for you, that bothers me for some time. I already
heard many times that extending a Native Objects (like Array,
Function, etc.) prototype is not a good idea (like the prototype lib
does). But when I try to find good reason for that I could not find
too many... I also tried to find this information here on google
groups, but with no success, so sorry If I ask for something obvious
for you. Would you be so kind and create a list of Pros and Cons of
extending Native Objects? I also would like to be Objective (not
subjective) so please don't say that generally idea is bad because
extending Object.prototype might broke normal usage of syntax like
"for (var..in..)" - you simply can not extend object, but still this
does not apply for a functions extending (unless you use for..in.. on
function objects). I heard that someone says that its bad from
performance side - is that true ? Whatever you get in mind please
share !
Thanks in advance for any responses here,
Cheers,
Wilq32
I got a question for you, that bothers me for some time. I already
heard many times that extending a Native Objects (like Array,
Function, etc.) prototype is not a good idea (like the prototype lib
does). But when I try to find good reason for that I could not find
too many... I also tried to find this information here on google
groups, but with no success, so sorry If I ask for something obvious
for you. Would you be so kind and create a list of Pros and Cons of
extending Native Objects? I also would like to be Objective (not
subjective) so please don't say that generally idea is bad because
extending Object.prototype might broke normal usage of syntax like
"for (var..in..)" - you simply can not extend object, but still this
does not apply for a functions extending (unless you use for..in.. on
function objects). I heard that someone says that its bad from
performance side - is that true ? Whatever you get in mind please
share !
Thanks in advance for any responses here,
Cheers,
Wilq32