Re: ECMAScript and chaining

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