Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS2 Discussion: Features: ES7 Decorators #4967

Closed
coffeescriptbot opened this issue Feb 19, 2018 · 6 comments
Closed

CS2 Discussion: Features: ES7 Decorators #4967

coffeescriptbot opened this issue Feb 19, 2018 · 6 comments

Comments

@coffeescriptbot
Copy link
Collaborator

From @svicalifornia on 2017-03-08 11:13

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?

@coffeescriptbot
Copy link
Collaborator Author

From @light24bulbs on 2017-03-10 01:07

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.

@coffeescriptbot
Copy link
Collaborator Author

From @mrmowgli on 2017-03-10 01:09

If you dig around a bit on closed issues you should see a thread about this
already. Concensus seems to be to do a postprocess with commented
annotations.

On Mar 9, 2017 5:07 PM, "light24bulbs" [email protected] wrote:

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.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
coffeescript6/discuss#74 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABy6x64HTtmwSX2vc3PGXjqL0OiWl0SQks5rkKJvgaJpZM4MWqKk
.

@coffeescriptbot
Copy link
Collaborator Author

From @light24bulbs on 2017-03-10 01:19

Here: coffeescript6/discuss#9

@coffeescriptbot
Copy link
Collaborator Author

From @mrmowgli on 2017-03-10 01:20

Coffeescript6 discuss I believe

On Mar 9, 2017 5:19 PM, "light24bulbs" [email protected] wrote:

Is that in coffeescript6 or in coffeescript?
I think we should at least link it for anyone who finds this thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
coffeescript6/discuss#74 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABy6x14tPcmkvmWUyxzVatrqoTUr5erTks5rkKUXgaJpZM4MWqKk
.

@coffeescriptbot
Copy link
Collaborator Author

From @light24bulbs on 2017-03-10 01:24

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

@coffeescriptbot
Copy link
Collaborator Author

From @GeoffreyBooth on 2017-03-10 03:34

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.

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

No branches or pull requests

1 participant