Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

CS2 Discussion: Features: ES7 Decorators #74

Closed
svicalifornia opened this issue Mar 8, 2017 · 7 comments
Closed

CS2 Discussion: Features: ES7 Decorators #74

svicalifornia opened this issue Mar 8, 2017 · 7 comments

Comments

@svicalifornia
Copy link

svicalifornia commented Mar 8, 2017

Decorators are an advancing proposal for ES7:

https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841

MobX (an alternative to the Redux state management library used in React apps) uses ES7 decorators to do its best magic. (For the curious, here's a comparison of Redux and MobX.)

Can we add support for decorators in CoffeeScript 2.0?

@factoidforrest
Copy link

I've just run into the same issue when trying to use MobX with coffeescript.

+1

It's exactly the type of syntax sugar that fits right into coffee's philosiphy. The issue is that the syntax is already used. The @ symbol is used and so it looks like you're calling a function to coffeescript. I propose we find some other symbol to make a decorator. Maybe the ~? Just needs to be something that won't conflict many peoples legacy code or any existing features.

@mrmowgli
Copy link

mrmowgli commented Mar 10, 2017 via email

@factoidforrest
Copy link

factoidforrest commented Mar 10, 2017

Here: #9

@mrmowgli
Copy link

mrmowgli commented Mar 10, 2017 via email

@factoidforrest
Copy link

Yeah I linked to it above in an edit. I disagree with the conclusion they reached but we can talk about it there.

@GeoffreyBooth
Copy link
Collaborator

Let’s keep the discussion in the original thread if you don’t mind. Also just because the issue is closed doesn’t at all mean it won’t be reopened; we use open/closed issues to track current priorities. As we run out of higher-priority features, some currently-closed ones might get reopened and worked on.

@coffeescriptbot coffeescriptbot changed the title ES7 Decorators CS2 Discussion: Features: ES7 Decorators Feb 19, 2018
@coffeescriptbot
Copy link
Collaborator

Migrated to jashkenas/coffeescript#4967

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants