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

Making sequences distinguishable from dictionaries (and interfaces and callbacks)

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 23 Sep 2014 22:01:54 -0400
Message-ID: <54222612.4080007@mit.edu>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Now that sequences are defined as "something iterable", it seems like we 
can reliably distinguish them from dictionaries: if an object is 
iterable, treat as a sequence, otherwise treat as a dictionary.

I'm proposing making that change in https://github.com/heycam/webidl/pull/19

That will allow APIs to declare an argument as a union of a sequence 
type and a dictionary type, which seems to be something people commonly 
want to do.

Received on Wednesday, 24 September 2014 02:02:22 UTC

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