W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: What changes to Web Messaging spec are proposed? [Was: Re: Using ArrayBuffer as payload for binary data to/from Web Workers]

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 8 Jun 2011 20:00:07 -0400
Message-ID: <BANLkTi=m+PcGazGK0_MPwvHpUaN7wM1G_w@mail.gmail.com>
To: Kenneth Russell <kbr@google.com>
Cc: David Levin <levin@chromium.org>, Arthur Barstow <art.barstow@nokia.com>, Andrew Wilson <atwilson@google.com>, Jonas Sicking <jonas@sicking.cc>, Dmitry Lomov <dslomov@google.com>, ben turner <bent.mozilla@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>, Ian Hickson <ian@hixie.ch>, Travis Leithead <Travis.Leithead@microsoft.com>
On Wed, Jun 8, 2011 at 5:33 PM, Kenneth Russell <kbr@google.com> wrote:

> I prefer continuing to use an array for several reasons: simpler
> syntax, better type checking at the Web IDL level, and fewer
> ECMAScript-specific semantics.
>
> Possibly, but it makes the design of this modification cleaner.

These don't sound too critical to me, and WebIDL supports using objects like
this now.  I suspect we'll start to see more of the
optional-parameters-in-an-object pattern, as APIs grow more complex and
start to need it more often.  I don't think it's inherently cleaner or
simpler either way--parameters in an object is very natural in JS, and much
clearer once you reach four or five parameters.

But if the simple array approach works, then there's just no need.

-- 
Glenn Maynard
Received on Thursday, 9 June 2011 00:00:43 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT