RubyJS: A JavaScript standard library based on the Ruby core-lib
rubyjs.org
rubyjs.org
> es5-shim.js and es5-shim.min.js monkey-patch a
> JavaScript context to contain all EcmaScript 5
> methods that can be faithfully emulated with a
> legacy JavaScript engine.
It provides Array::map, Array::filter, Array::reduce as defined in Ecmascript 5 along with String::trim and others, as well as replacing buggy implementations.Previous versions of es5-shim included shims for things that cannot be correctly or completely shimmed in ES3 but those have since been separated and I now recommend including es5-shim in basically all web projects to get closer to a modern javascript in most browsers.
And I'm definitely not saying that PHP.js should be used.
[edit] To be more specific, I really don't see the point of using a third-party library when the native methods are available. IMHO, if you choose a language, you should stick with it.
If I had to code JavaScript I would use RubyJS.
Yukihiro (Matz) Matsumoto, creator of Ruby
Of course, the best authority for writing ruby-like JS is Matz, who else would be better? ;-DWhy add another layer of complexity and error proneness? What happens when a different js programmer needs to review your code? Or when you need to write some Node.js code and forgot all about syntax?
"The main motive is to have a decent standard library for JavaScript" - jQuery works just fine.
This is JavaScript, in the same way that jQuery is JavaScript.
jQuery, Prototype and afaik Underscore helper functions have been wrote when the standard wasn't ready. Now that it is, developers should start using them.
They've donated their time to add something new to the ecosystem. You are under no obligation to use it.
I use ES5 shim instead. That way when I ditch support for IE8, I don't have to fix anything.
[1] Obviously Underscore doesn't have methods, it has utility functions attached to punctuation.
Hell, I could even use JQuery for a lot of this stuff, but I really like ruby standard library and it's cleaness.
If it is the case, i expect the performance to be pretty abysmal. Do you have some data on that ?
Here's the launch presentation at jscamp.asia: http://www.youtube.com/watch?v=7T0PJbJaMwA