Hello, Sorry if this is an ignorant request, I scanned the proposals and didn't see anything that appeared similar.
Is it appropriate for ECMAScript to include a Queue implementation, or adjust shifting to a constant amortized time operation? Server-side usage of the language is mostly formidable nowadays, and I've run into cases where it would have been convenient to have an in-language queue. I see in the latest Array.prototype.shift documentation ( https://tc39.github.io/ecma262/#sec-array.prototype.shift) that shift is still intended to be an O(n) operation, meaning those wanting to implement a proper queue may need to rely on external libraries, like this one: https://github.com/petkaantonov/deque . As the github link mentions, V8 has a trick to get around array resizing, but for serious users we still need to rely on an external library. It'd be great if this was a built-in feature. I'm sure someone has looked at this before - what do you think? Best, Zach Boldyga Scalabull | Founder 1 (866) 846-8771 x 101
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

