-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Project: Core Features #4906
Comments
From @JimPanic on July 22, 2016 17:47 Using the ECMAScript 6 compatibility list as a reference for prioritizing is probably a good idea. That said, I think fat-arrow functions, I second prioritizing async/await rather low compared to the rest. I'm not even sure how far this is standardized already anyways? |
From @carlsmith on July 23, 2016 2:10 Why do we need fat arrow functions? Or special sugar for decorators? We don't have function or class statements, so we can apply decorators by just putting them in front of the function or class we're decorating. Say you have a decorator called f = memo (args...) -> console.log args
j = (memo 10) (args...) -> console.log args That syntax works fine.
I think we should prioritise classes and modules way above that other stuff personally. We can't use CoffeeScript with a growing chunk of the JS ecosystem because we can't import a module or extend a class, making CoffeeScript partially obsolete. The other stuff is just nice to have.
|
From @rattrayalex on July 23, 2016 2:34
Well, we don't. But:
Ultimately I agree that it shouldn't be a Top Priority, but would definitely like to see it in V1. |
From @rattrayalex on July 23, 2016 2:37
ES6 has it, so we should too 😉 Of course, that doesn't mean it should be a Top Priority. However, I'm not sure the workaround you suggested would work with classes? pureRender
class MyComponent extends React.Component Or methods, for that matter – in ES6, you can do: const myObj = {
@someDecorator
method() {
return 1;
}
} I'm not sure how that would look in Coffee? |
From @rattrayalex on July 23, 2016 2:41
While I don't think async/await is as important as classes, modules, and possibly a few others, I definitely don't think we should wait that long – by then, it'll be too late. People are already using the feature in Babel and TypeScript, and have been for a while – and experimental support landed in Chrome several weeks ago. Not only that, but it may be tricky to do (thus requiring a lead time) and is a feature designed to fix one of the most bothersome parts of JavaScript programming (node especially) – callback hell and neverending promises. |
From @rattrayalex on July 23, 2016 2:44 Hmm, fair. I'd rather not force hacks, though, when we can build a feature people seem to want. |
From @rattrayalex on July 23, 2016 2:54 Let's move the decorators and async/await convo's to separate threads and keep this thread centered around prioritization. @carlsmith would you mind moving your comments there to keep this thread clean? I'll do the same. |
From @rattrayalex on September 9, 2016 15:30 Closing as this has been "officially" (if tentatively) decided in the Features.md file. Further discussion can happen around Pull Requests seeking to modify that file. |
From @rattrayalex on July 22, 2016 16:15
EDIT: this is now better-documented in the Features.md file. Leaving the below for posterity.
@DomVinyard proposed these as the "core four" for this effort:
These are things that we "absolutely, definitely need", and will take priority over other changes.
However, this list may be too short. Other possibilities:
In particular, Async/Await, being less widely supported and used at this point, may not make sense to take priority over more widely used features like decorators, or more core-to-the-language features like
const
andfor
.Thoughts?
EDIT: I'll keep this bit as an evolving understanding:
Tier 1
(features essential for JavaScript interop):
Tier 1A
(breaking changes that catch CS up with ES6)
Tier 2
(non-essential, popular ES6 Good Parts)
Tier 3
(non-essential ES6 features and new features)
Copied from original issue: coffeescript6/discuss#8
The text was updated successfully, but these errors were encountered: