Forum: Rails Spinoffs (closed, excessive spam) JavaScript 1.8 Array.reduce()

Posted by Louis-Philippe Huberdeau (Guest)
on 2008-06-23 18:52
(Received via mailing list)
Prototype currently overrides a method from the JavaScript 1.8
specification with a different behavior.

http://developer.mozilla.org/en/docs/Core_JavaScri...

To use a similar behavior, reduceRight can be used. However, this does
not seem very good for future compatibility.

Also, I noticed that a few other methods get redefined, like map(),
every(), filter(), some(). I did not verify the implementation
details, but I would certainly prefer to use the browser's native
implementation when available.

Are there any plans for these in future releases?

--
LP
Posted by kangax (Guest)
on 2008-06-23 19:01
(Received via mailing list)
There are plans to deprecate prototype's Array#reduce. Most likely in
1.6.1

- kangax

On Jun 23, 12:51 pm, Louis-Philippe Huberdeau <lphuberd...@gmail.com>
This topic is locked and can not be replied to.