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

Re: URLQuery / FormData

From: Rick Waldron <waldron.rick@gmail.com>
Date: Tue, 10 Sep 2013 13:11:44 -0400
Message-ID: <CAHfnhfoWrWTyYryq6OByciZhn9MOzaF-+ZwEUZveRihU8yjLxA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, Jonas Sicking <jonas@sicking.cc>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Tue, Sep 10, 2013 at 1:01 PM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Tue, Sep 10, 2013 at 5:48 PM, Rick Waldron <waldron.rick@gmail.com>
> wrote:
> > In support of #2, one of the most important aspects of jQuery's success
> with
> > developers was the elimination of "modes" with regard to: 1) a single
> > element, 2) a node list. This was my basis for suggesting to Anne that
> > "modes" be eliminated from the design. Instead of trying to make an API
> that
> > has a function for returning one value (or the first of a set of values)
> and
> > another function for returning the entire set of valuesójust have a
> single
> > function that always returns the array value for that key, regardless of
> the
> > number of items stored. This approach also means that the end developer
> > doesn't have to remember when to use get() or getAll(), because the
> > "no-modes" version of get() always returns the same _type_, which also
> means
> > that further operations on the value are as simple as using the existing
> > array methods (vs. needing to know if there will be a single string value
> > returned or an array of strings).
>
> To be clear, we never had modes. get() always returned the first value
> or null. getAll() always returned all values or the empty list.
>

Those are the two modes I was referring to and recommending consolidation
into .get() => [...vals]. I apologize if my use of the word "modes" was
incorrect or unclear.


Rick
Received on Tuesday, 10 September 2013 17:12:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC