Re: [selectors-api] Return an Array instead of a static NodeList

On 30 août 2011, at 18:07, Jonas Sicking <> wrote:

> On Tue, Aug 30, 2011 at 2:32 AM, Julien Richard-Foy
> <> wrote:
>> I think it’s better to return an immutable object (mutable objects are source of programming errors). But this immutable object should have traversing method (forEach, map, filter, etc.).
> Can you explain how mutable objects are a source of programming
> errors. It seems that javascript made the choice a log time ago to use
> mutable objects and settable variables, as opposed to for example
> haskell.

Sure, have a look to these links:

But that's not so important. If you just add traversing methods to NodeList it would be a huge improvement.

Received on Tuesday, 30 August 2011 19:22:45 UTC