Artem S. Povalyukhin

Results 69 comments of Artem S. Povalyukhin

@nettnikl > However, during one request, there are multiple log entries to be written. So, why not to aggregate 'em into array? ```js var logdata = []; function logsome(data) {...

@ljharb It does guarantee that the order is the same as in `for in`, but does not require sorted numbers go first.

But in the case of middle-ware there is no profit from the 'fix' only an unneeded overhead and inconsistency in number processing: ```js // node > var o = {},...

So, Web Reality is forcing the browsers to waste computational resources, instead of forcing developers to fix their [code](https://stackoverflow.com/questions/2647201/how-to-iterate-javascript-object-properties-in-the-order-they-were-written). It's sad, but the reason is to make endusers happy, ok....

@jirutka > A more severe issue is that njs _in some cases_ does not preserve the insertion order of the properties: In njs objects are simple hashes, they doesn't have...

> njs implements ECMAScript, not Java language. https://262.ecma-international.org/5.1/#sec-15.2.3.14 https://262.ecma-international.org/5.1/#sec-12.6.4 > The mechanics and order of enumerating the properties (step 6.a in the first algorithm, step 7.a in the second) is...

> this is totally unexpected and it may be a serious problem for njs adoption in a wider community. To me it's totally unexpected, that one will rely on the...

BTW, i think , we need a `Map` & `Set` to cover a linked map/set usage cases.

@ljharb > Note that Map and Set in JS are ordered as well. yeah, but without integer footgun :) > why is anyone JSON parsing a 1MB string, if you’re...

> It’s not a footguns, and if you spread a Map or a Set to an array (as is common) you get integer indexes anyways. I mean unexpected integer keys...