Decorators for functions
Alexander Jones
alex at weej.com
Tue Oct 20 22:36:32 UTC 2015
I've become convinced by this thread that we don't need this. Other
languages where decorators are useful and prevalent don't have the
expressivity JS has, particularly regarding dynamism and function
expressions. JS `class` is an awkward case due to not supporting non-method
members, but I think that is one of the actual problems that should
be solved.
Another major point I have is that most of the reasoning for decorator
syntax is actually generic reasoning for paren-free function invocation
à la Perl, Ruby, CoffeeScript, etc. Let's talk about that, instead of
building unilateral syntax extensions into the language.
On Tuesday, 20 October 2015, Jonathan Bond-Caron <jbondc at gdesolutions.com>
wrote:
> On Tue Oct 20 05:30 AM, Axel Rauschmayer wrote:
> > The decorator proposal does not include decorators for functions,
> > because it isn’t
> > clear how to make them work in the face of hoisting.
> >
>
> What's the obsession with decorators?
>
> Decorators are like saying everyone can decorate their Christmas trees.
> That's nice once a year but not when you start looking at all the
> different Christmas trees and have to maintain that stuff.
>
> Suddenly the single language you thought you understood has many dialects
> & philosophies.
> Aren't embeddable languages more interesting to learn then decorated trees?
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org <javascript:;>
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151020/0140f0e8/attachment.html>
More information about the es-discuss
mailing list