W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: ECMAScript and chaining

From: Mark S. Miller <erights@google.com>
Date: Thu, 22 Nov 2012 14:59:17 -0800
Message-ID: <CABHxS9jXfZm6+caSY8zJbGTsHu=CF=vXWxtr6wROjrtzxx=5Uw@mail.gmail.com>
To: Rick Waldron <waldron.rick@gmail.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Nov 22, 2012 at 1:40 PM, Rick Waldron <waldron.rick@gmail.com> wrote:
> I based this statement on the static Object.* API methods that return their
> target object and Array.prototype methods that return a new array with the
> results of the operation performed (map filter).

The static methods, being static, reliably (under normal assumptions)
obey their contract. The array methods return a new object *rather
than* perform a side effect, and so are a counter example. Neither of
these argue for chaining through a late bound instance method whose
actual purpose is only to perform a side effect.


--
    Cheers,
    --MarkM
Received on Thursday, 22 November 2012 22:59:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:08 UTC