> I'm on the fence. In the past I have argued vehemently against modifying
> the prototype of native objects. An early claim of qooxdoo was that it
> would never alter native prototypes, yet there were cases where it in fact
> did so.

Yep. I guess implementation diverged from the claim at one point.

> be polyfilled. The problem comes when one library creates a polyfill that
> does not strictly meet the spec,

which, as you were pointing out earlier, might be the case more often than
not.

> and some other library needs one of the
> features that's not implemented in the polyfill, but assumes that if the
> function is available, then it is fully implemented.

Yes, it's mostly an either/or decision. If the feature is there, it's
there. There is no sense in running an extensive unit test suite against
any feature that is found, to assure it is highly spec-compatible
(although this might be a good debugging strategy).

> We (qooxdoo
> developers) seem to be doing more and more incorporating of external
> libraries in our qooxdoo apps, and I do worry that we're going to
> encounter
> compatibility issues with one vendor's polyfill implementation or
> another's.

I understand your concern, but how big is the risk of such issues? I mean,
how often do you write code that relies on, say, the "length" of a
function?! So a defensive strategy would be not to rely on arcane
properties of a feature that might be polyfilled.

On the other hand I could see that most libraries that need it would rely
on trusted polyfill implementations like modernizr or es5-shim which would
further reduce the risk of buggy polyfills.

> I think that my opinion is that if the polyfill can be implemented 100% to
> the spec, there should be no problem doing it. If it can't be done 100% to
> the spec, it's probably better left without the polyfill.

But, according to your own reasoning, that would rule out most polyfills,
wouldn't it?!

T.



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to