sindresorhus / ponyfill

🦄 Like polyfill but with pony pureness
1.22k stars 26 forks source link

Polyfills for dependencies #4

Open jamiebuilds opened 7 years ago

jamiebuilds commented 7 years ago

@ljharb brought this up in TC39 the other day...

Ponyfills should absolutely be encouraged, I think there's plenty of benefits to using them. However, there's a valid use case of polyfills that gets ignored:

When you have nested dependencies that have less backwards support than you do they won't use ponyfills/polyfills. Now you can't use that particular dependency without using a full polyfill unless you fork the dependency (which could also be several deps deep).

  1. I think package authors should be encouraged to use ponyfills longer than everyone else
  2. I think polyfills should be limitedly encouraged as the correct solution to that particular problem
sindresorhus commented 7 years ago

Agreed

lacymorrow commented 7 years ago

Yes, I will say that Ponyfills are quite clever for graceful degradation. Support everything. It's our job.