Decorators for functions
Eli Perelman
eli at eliperelman.com
Tue Oct 20 14:23:10 UTC 2015
More drive-bys.
I could see decorators as a nice way to define "functional" behavior for
generic functions:
@curried
var add = (a, b) => a + b;
@memoize
var fetch = (url) => /* logic */;
Eli Perelman
On Tue, Oct 20, 2015 at 8:42 AM, Kevin Smith <zenparsing at gmail.com> wrote:
> I would just say that it is odd in the extreme that a group of
>> world-leading language designers would just throw in the towel when
>> confronted with a pretty small roadbump, instead of figuring out ways to
>> solve it.
>>
>
> Another drive-by...
>
> The trick is introducing new features without exploding the number of
> rules which must be remembered in order to use that feature.
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151020/be609dc9/attachment.html>
More information about the es-discuss
mailing list