

Polyfills or Ponyfills? - ponyfoo
http://ponyfoo.com/articles/polyfills-or-ponyfills

======
mrosata
I think that if your entire program is written to heavily rely on polyfills in
all areas then you may be asking for trouble. However, I think that extending
objects through their prototypes is a valid way to implement functionality (as
it's a defining principle of the language), and I don't think I would tell
someone not extend the base String object if they invented some new great
desired feature for Strings. So isn't that what a polyfill does? Regardless if
the feature is implemented in 50% of browsers or 0% of them, there will be
edge cases, we all know that. Polyfills apply a pressure to the industry that
breathes movement into the language and makes people aware of the what is
coming. If you _need_ a polyfil to accomplish your goals then I say use it. If
there is a safer more reliable way to create the functionality then that's the
way to go. The only bit about the ponyfill idea that I don't like is that when
a feature does become supported, now all of a sudden I'd have a pile of code
relying on heavy refactoring where polyfills can ease the transition.
Interesting article though, awesome, thanks!

------
tantalor
This is the premise of Closure Library, e.g., goog.string.trim().

[http://closure-library.googlecode.com/git-
history/docs/local...](http://closure-library.googlecode.com/git-
history/docs/local_closure_goog_string_string.js.source.html#line286)

