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

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 UTC