W3C home > Mailing lists > Public > public-nextweb@w3.org > July 2013

Prollyfills and the global namespace / multi-fills

From: Brian Kardell <bkardell@gmail.com>
Date: Wed, 3 Jul 2013 12:58:50 -0400
Message-ID: <CADC=+je7kJ=q6fP-sxy0krV0PA3XJXkkq5dH_fE4h2XdiFLu3w@mail.gmail.com>
To: "public-nextweb@w3.org" <public-nextweb@w3.org>
I know i might be in the minority here, a lot of prollyfills are trying to
implement the proposed native thing kind of thinking that a prollyfill just
becomes a polyfill.  I think this is dangerous as if it did become a
standard, there is a pretty likely that there are some changes along the
way.

The idea with Hitch was to be a prollyfill framework giving you places to
encapsulate and a global object upon which to hang proposed things.  We
took the approach of "let's be honest, this is an emulation of a proposal.
If it was fast enough yesterday it will only get faster.  As someone who
writes web sites and apps I value the sites I write not suddenly breaking
when a new browser is released much more than an unforseeable perf bump -
the risk is just too great.

In all honestly, the way things are strung together today - sometimes this
will be tough, so I'm not saying it should be a *mandate* or something,
just that as a practice, it's probably good to avoid IMO.

I kinda think that a real good approach would be to return your function
and let *them* attach it or use it (module style).  That way, assuming it
seems good, you could add it to Hitch or Polymer or X-Tags or whatever and
if you get really lucky, it can be quickly plugged in to window as a
polyfill.

It's also tricky when you have something that might need 2 ideas in order
to be really good - CSS + CSSOM, for example... This is where I think some
kind of framework is really potentially handy because you can keep
them separate and then have something that pulls in the relevant bits to
plug them together.... But, I'm unsure of how to play that part TBH.
Received on Wednesday, 3 July 2013 16:59:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:05:54 UTC