On Wed, Oct 10, 2012 at 1:22 PM, Kevin Smith <[email protected]> wrote:

> We've discussed this extensively before and there doesn't seem to be many
>> plausible use cases for the function length property.
>
>
> Here's the only use case that I've encountered (admittedly not
> particularly strong):  Overriding the behavior of a function/method based
> on the "signature" of an input function:
>

express for node already does this, for error handlers:

    http://expressjs.com/guide.html#error-handling

express is very popular; #4 on Most Depended Upon packages; #1 on Most
Starred at npm:

   https://npmjs.org/

I will admit a certain amount of dislike for this technique, and
overloading in general; would it really be so hard to provide an
`app.useError()` API instead of 'overloading' `app.use()`?

-- 
Patrick Mueller
[email protected]
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to