You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 19, 2018. It is now read-only.
ECMAScript classes will be implemented via a new`esclass` keyword, that has different syntax from the existing`class` keyword.`esclass` will compile to ES2015`class`, as will its constructor, methods, getters and setters.`super` inside`esclass` will function like ES2015’s`super`. There will be no sugar on top of`esclass`, to avoid building a customization that might get implemented differently by ECMAScript in the future.
18
-
19
-
This is a very minor breaking change for the current compiler. Any current projects using`esclass` as a symbol (e.g., a variable or function or class name) will need to be refactored, with the symbol renamed. This breaking change doesn’t seem major enough to warrant an opt-in flag.
17
+
Awaiting consensus. We could create a new`esclass` that outputs to`class`, leaving the old CoffeeScript`class` alone; or we can break backward compatibility and have`class` output to`class`, and certain things like executable class bodies are no longer allowed.
>An[old pull request](https://github.com/jashkenas/coffeescript/pull/3757) basically implements this feature exactly as we’ve outlined it below, though the PR contains an ES5 shim. There is a discussion of whether the feature should be implemented with the shim, only as outputting ESNext syntax, or outputting both (with the ESNext output triggered by a new flag).
29
+
>An[old pull request](https://github.com/jashkenas/coffeescript/pull/3757) basically implements this feature exactly as we’ve outlined it below, though the PR contains an ES5 shim.
32
30
33
31
`async`/`await` isn’t completely standardized yet; it’s not part of ES2015 or ES2016, though support has started appearing in browsers.[It has reached Stage 4 of ES2017](https://github.com/tc39/proposals/blob/master/finished-proposals.md).
34
32
@@ -60,9 +58,7 @@ main()
60
58
61
59
>**This is a breaking change for the current compiler.** The`await` keyword is not currently reserved, so adding it as a reserved word would break any code that currently uses`await` as a symbol.
62
60
63
-
###`const` assignment operator[(#31)](https://github.com/coffeescript6/discuss/issues/31) or
For whatever reason,`let` and`const` are among the most popular features introduced by ES2015. Awaiting consensus on which of these two proposals we want to adopt, if either. Per[#1](https://github.com/coffeescript6/discuss/issues/1), there seems to be consensus that we want some way to support`const` and probably`let` in CoffeeScript.
Copy file name to clipboardExpand all lines: README.md
+2-16Lines changed: 2 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,9 @@
23
23
24
24
```
25
25
26
-
This repo intends to serve as a place to discuss the future of CoffeeScript, especially as it relates to ES2015+ (ES6).
26
+
This repo intends to serve as a place to discuss the future of CoffeeScript, especially as it relates to ES2015+ (ES6).
27
27
28
-
[Open an issue](https://github.com/coffeescript6/discuss/issues/new) to propose an idea or raise a question! This is also where proposals for adding features to CoffeeScript can be discussed. As proposals reach consensus, the consensus will be summarized in[Features](./Features.md).
28
+
[Open an issue](https://github.com/coffeescript6/discuss/issues/new) to propose an idea or raise a question! This is also where proposals for adding features to CoffeeScript can be discussed. As proposals reach consensus, the consensus will be summarized in[Features](./Features.md). No code will be developed here; the “CoffeeScript 6” project is one of discussion, directed at updating CoffeeScript itself.
29
29
30
30
You can also drop by this[Gitter Chatroom](https://gitter.im/csnext/Lobby).
31
31
@@ -71,20 +71,6 @@ Features that developers enjoy in ES2015+ that are appropriate to implement in C
71
71
72
72
CoffeeScript’s output should be modernized as much as possible. Fat arrows should output as fat arrows, destructuring should output as destructuring, etc. But this should be the**last priority**—it makes our source code cleaner, and debugging eventually easier when ES2015 features are supported natively in runtimes, but otherwise ES2015 output has little benefit for developers. That said,*new* features, especially ES2015+ ones, should be output as ES2015+ code. We shouldn’t duplicate the work of the Babel team, implementing ES5 polyfills. The modernized output might be implemented as part of an effort to create a[new compiler](./Compiler.md), or as a[flag in the current one](https://github.com/coffeescript6/discuss/issues/34).
73
73
74
-
###Public Roadmap
75
-
76
-
The[coffeescript6 repo](https://github.com/coffeescript6) is a big step in the right direction toward remedying the issue defining CoffeeScript’s currently unclear future. When we reach a consensus, our plan should be posted on[coffeescript.org](http://coffeescript.org/) and the[README for the coffee-script repo](https://github.com/jashkenas/coffeescript).
77
-
78
-
###Leadership
79
-
80
-
We also should come up with a defined leadership structure and formal process for approving features and syntax. As great as@jashkenas is, a language that so many people depend on should not be subject to the whims of one person.[The leadership question is one that needs to be worked out.](https://github.com/coffeescript6/discuss/issues/3)
81
-
82
-
##Name
83
-
84
-
The “CoffeeScript 6.0” name was chosen as a name for the discussion of how to modernize CoffeeScript in response to ES6. It is not intended as the name of any new compiler.
85
-
86
-
There’s no need for something fancy or new. We already have considerable recognition under the name “CoffeeScript,” so we should keep it. Let’s refer to the soon-to-be-old compiler as the Legacy CoffeeScript compiler, and the new one—well, “it’s just CoffeeScript.”
87
-
88
74
##Open Questions
89
75
90
76
The[Issues](https://github.com/coffeescript6/discuss/issues) for this repo covers the various ES2015+ features and discussions regarding how to implement them. If you don’t see your favorite ES2015+ feature there, or want to propose your own new feature for the language, please[open an issue](https://github.com/coffeescript6/discuss/issues/new). That’s also the place to discuss the specifics of how to move this project forward.