Re: Unordered setsmaps, for when ordering is hard/expensive/unwanted?

On Fri, Aug 30, 2013 at 4:34 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Plain JS Sets and Maps are intrinsically ordered - they remember the
> order that things were added to them, and reflect that when you
> iterate over them.
[...]

Private correspondence with Mark Miller revealed that I may have not
been quite as clear as I wanted in describing what I needed.

There's nothing wrong with the current "insertion-order" semantics for
author-level Maps and Sets.  Those are fine.  However, "insertion
order" is meaningless for some *UA-provided* Maps and Sets that we're
producing now or will in future APIs.  We thus have to define an
alternative ordering, and for some types of content, doing is
difficult or expensive.  Finding a cheap way to reduce authors'
reliance on ordering, such by adopting Go-ordering, would allow us to
let "implementation-defined order" exist in a way that isn't painful.

~TJ

Received on Sunday, 1 September 2013 18:38:51 UTC