4 ms·
Part of the difficulty with the dogma surrounding the issue of whether or not it's ok to extend built-in objects comes from extrapolating a set of guidelines an
by bcrescimanno 15y ago
Part of the difficulty with the dogma surrounding the issue of whether or not it's ok to extend built-in objects comes from extrapolating a set of guidelines and rules for library / framework developers to everyone else. There's real value in libraries not extending built-in objects simply because they can't make any real guarantees about their execution environment and shouldn't force their customizations on all code in that environment.
I think part of it comes from the most vocal (and probably most respected) JS developers tend to be library developers and their guidelines for themselves and each other tend to get misconstrued as general guidelines for JS development.
When you're developing in a known execution environment, I don't see any particular issue with extending natives.