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.
Copy file name to clipboardExpand all lines: README.md
+81-15Lines changed: 81 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,7 @@
25
25
26
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 or updating current features’ output 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
-
30
-
You can also drop by this[Gitter Chatroom](https://gitter.im/csnext/Lobby).
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 or updating current features’ output can be discussed. As proposals reach consensus, the feature will be added[below](features-implemented) and to the[project board](https://github.com/coffeescript6/discuss/projects/1). No code will be developed here; the “CoffeeScript 6” project is one of discussion, directed at updating CoffeeScript itself. You can also drop by this[Gitter chat room](https://gitter.im/csnext/Lobby).
31
29
32
30
##Background
33
31
@@ -37,11 +35,9 @@ Many people were drawn to CoffeeScript because it offered features that JavaScri
37
35
38
36
Many other people, however, came to CoffeeScript for the clean, readable syntax and the many ways that the language itself helps prevent bugs, such as significant whitespace and the existential operator. CoffeeScript still has these advantages over all versions of JavaScript, and will retain them so long as ECMAScript strives for backward compatibility. But for CoffeeScript to remain a viable choice for developers, it must keep pace with the JavaScript community. At the very least it must be compatible with most popular frameworks and build tools; ideally it will also be current with the latest approved standard. The mantra of CoffeeScript is that “It’s just JavaScript”—but right now, JavaScript is ES2015.
39
37
40
-
#Proposal for the Future of CoffeeScript
41
-
42
38
##Goals
43
39
44
-
**ES2015 features that modern frameworks require, like modules and classes, must be supported in CoffeeScript ASAP.** We can’t expect developers to continue using CoffeeScript if they must choose between CoffeeScript and whatever hot new framework they want to use for their project. Support for modules is[has beenmerged in](https://github.com/jashkenas/coffeescript/pull/4300).
40
+
**ES2015 features that modern frameworks require, like modules and classes, must be supported in CoffeeScript ASAP.** We can’t expect developers to continue using CoffeeScript if they must choose between CoffeeScript and whatever hot new framework they want to use for their project. Support for modules is[has beenreleased in CoffeeScript 1.11](https://github.com/jashkenas/coffeescript/pull/4300) and support for classes[has been merged into the`2` branch](https://github.com/jashkenas/coffeescript/pull/4354).
45
41
46
42
**CoffeeScript should support other ES2015+ features on a case-by-case basis.** There is very little that ES2015 offers that CoffeeScript lacks; but whatever new features that make sense within the constraints of CoffeeScript’s design principles, and can be implemented in a reasonable way, should be supported. We don’t want developers to feel like choosing CoffeeScript means they’re giving up features they had in ES2015. Please refer to the[issues](https://github.com/coffeescript6/discuss/issues) of this repo for discussion around which ES2015+ features to add, and how they should be defined and implemented in CoffeeScript.
47
43
@@ -53,23 +49,93 @@ Many other people, however, came to CoffeeScript for the clean, readable syntax
53
49
54
50
##The Plan
55
51
56
-
See the[Features document](./Features.md) for a prioritized list of ES2015+ features that we hope to add toCoffeeScript, including proposed implementation for each feature.
52
+
###CoffeeScript 1.x
57
53
58
-
The top priorityfeaturesare thosethatimperil interoperability. CoffeeScript is hemorrhaging marketshare the longer that incompatibilities with popular frameworks and build tools go unaddressed. We must support modules, classes and tagged template literals ASAP. See[here](./Features.md#top-priority).
54
+
New ES2015+featuresthat can be opt-in by using them andthatdon’t break backward compatibility, like modules, have been added to CoffeeScript in the current`master` branch and released. These features aren’t shimmed or polyfilled down to ES5; they are output as ES2015.
59
55
60
-
Aside from the top priority features, features that developers enjoy in ES2015+ that are appropriate to implement inCoffeeScript, like`await`, should be implemented as time permits. See[here](./Features.md#medium-priority).
Finally,CoffeeScript’s output should be modernizedasmuch as possible.Fat arrows shouldoutput asfat arrows, destructuring should outputasdestructuring,etc.
58
+
New ES2015+ features that cannot be added without causing breaking changes, like classes,[are implemented on a`2` branch](https://github.com/coffeescript6/discuss/issues/36) for a futureCoffeeScript 2.0.0 release. This new release will break backward compatibility, butasminimally as possible.Also in 2.0.0, we will modernize theoutputofasmany features as possible and removeasmany shims and polyfills as possible. CoffeeScript 2.0.0 will go through several rounds of alpha releases like 2.0.0-alpha1, 2.0.0-alpha2etc. so that we can add features gradually and avoid committing to a final set of breaking changes before we’re ready. You can also read[draft documentation for CoffeeScript 2](https://rawgit.com/GeoffreyBooth/coffeescript/2-docs/docs/v2/index.html).
New ES2015+ features that can be opt-in by using them and that don’t break backward compatibility, like modules, should be added toCoffeeScriptin the current`master` branch. These features would not be shimmed or polyfilled down to ES5; they would be output as ES2015.
CoffeeScript’s`super` should always be compiled to ES2015’s`super`. This is in progress at[jashkenas/coffeescript#4424](https://github.com/jashkenas/coffeescript/pull/4424).
New ES2015+ features that cannot be added without causing breaking changes, like classes,[should be implemented on a`2` branch](https://github.com/coffeescript6/discuss/issues/36) for a future CoffeeScript 2.0.0 release. This new release will break backward compatibility, but as minimally as possible. Also in 2.0.0, we will modernize the output of as many features as possible and remove as many shims and polyfills as possible. CoffeeScript 2.0.0 will go through several rounds of alpha releases like 2.0.0-alpha1, 2.0.0-alpha2 etc. so that we can add features gradually and avoid committing to a final set of breaking changes before we’re ready.