W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 1 Sep 2013 11:38:05 -0700
Message-ID: <CAAWBYDDPPsmib2qe=aGWvbai-tOawjQr93jV0gc8uROSgSQVcQ@mail.gmail.com>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC