Re:Python and the Real-time Web
by pronoiac on Monday June 24, 2013 @04:01PM
(#5935290)
When did "polyfill" replace "shim," I wonder?
[ Parent
| on HN ]
http://remysharp.com/2010/10/08/what-is-a-polyfill/
"Shim, to me, meant a piece of code that you could add that would fix some functionality, but it would most often have it’s own API. I wanted something you could drop in and it would silently work (remember the old shim.gif? that required you actually inserted the image to fix empty td cells – I wanted something that did that for me automatically).
I knew what I was after wasn’t progressive enhancement because the baseline that I was working to required JavaScript and the latest technology. So that existing term didn’t work for me."
Re:Python and the Real-time Web
by the_cat_kittles on Monday June 24, 2013 @09:57PM
(#5937025)
I think of "polyfill" as filling many different holes to make it so you can forget about the different cases (browser compatabilities in this case). A polyfill pours concrete over a bumpy surface and makes its smooth. "Shim", to me, is essentially synonymous with monkey patch, i.e. something you shove in there to make something work- shoving a folded napkin under a table leg to make it flat is shimmy to me.
> I think of "polyfill" as filling many different holes to make it so you can forget about the different cases (browser compatabilities in this case). A polyfill pours concrete over a bumpy surface and makes its smooth.
Kind of like a façade then[1]? A shim would probably be synonymous with an (very informal) adapter.
Re:Python and the Real-time Web
by drakeandrews on Monday June 24, 2013 @05:01PM
(#5935646)
I've always taken it to be that it's a polyfill if it's somewhat elegant, or where a newer technology encompasess a superset of an older one and a shiv if it's somewhat hackish or where older technologies are made to stand in for newer ones. I am probably wrong.