Re:Essential JavaScript Design Patterns For Beginners
by Silhouette on Friday February 17, 2012 @11:33PM
(#3605953)
From the readme for that library:
> This package requires quite a bit more attention and testing.
> It is not likely to behave as advertised in a large cross-section of browsers.
That doesn't sound like a cross-browser solution. In fact, it doesn't sound like a professional-level solution at all.
Perhaps one day it will be, but if you're arguing that using this kind of library is a best practice today and that developers should eschew jQuery in favour of such alternatives, then I don't think your position is credible at all.
Re:Essential JavaScript Design Patterns For Beginners
by prodigal_erik on Friday February 17, 2012 @02:40PM
(#3604684)
> In many cases, this means that these shims cause many ES5 methods to silently fail.
Considering you don't even get the opportunity to detect the problem and turn off the failing progressive enhancement in favor of the non-js behavior, this doesn't seem like a realistic alternative to just writing pre-ES5 code that's known to work.
Re:Essential JavaScript Design Patterns For Beginners
by oinksoft on Friday February 17, 2012 @02:56PM
(#3604739)
That's just FUD though. The potentially "silently failing" methods are all documented, and do not include any of the most commonly used ES5 features (Function.prototype.bind, Array.prototype.filter, etc.).
https://github.com/kriskowal/es5-shim
Especially when you note that JavaScript is not just run in browsers these days, and that most server-side deployments do implement ES5 features, it makes very little sense for modern tutorials to avoid ES5 features unless they are trying to demonstrate drop-in snippets with no library dependencies. It seems clear that the author is not shy about including other libraries with his code.