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.
###Classes: Extend ES Classes[(#22)](https://github.com/coffeescript6/discuss/issues/22)
18
18
19
19
>CoffeeScript 2 only
20
20
21
-
As part of CoffeeScript 2, we willrevise CoffeeScript’s`class`syntaxtobe compatible with ECMAScript’s`class`; this means no codein classbodies, no using`this` in a constructor before calling`super`,etc. We try to keep as many features of the CoffeeScript`class` as possible while still ouputtingtheECMAScript`class` keyword, so that we can extend ES classes and create extendable native classes. Getters and setters[(#17)](https://github.com/coffeescript6/discuss/issues/17) would probably be implemented as part of supporting ES classes. This is in progress at[jashkenas/coffeescript#4354](https://github.com/jashkenas/coffeescript/pull/4354).
21
+
As part of CoffeeScript 2, we willupdate CoffeeScript’s`class` tooutput an ES`class` keyword, so that ES2015 classes can be extended and so that CoffeeScript classes can be extendedinES. We will also revise CoffeeScript’sclassoutput to handle`this` in a constructor before calling`super`,and any other changes we need to make to adhere to ES syntax. This isthe“must-do” part of classes; improving the output by making it more idiomatic (not using`prototype` or`__super__`, etc.) is a separate item under Medium Priority below. This is in progress at[jashkenas/coffeescript#4354](https://github.com/jashkenas/coffeescript/pull/4354).
Some new libraries require support for ECMAScript template literals, which are incompatible with CoffeeScript’s backticks. Support would be added for`myTag"hello #{'wo'+'rld'}"` or`myTag"""some multiline string"""`. Such syntax is currently not allowed in CoffeeScript, so enabling support for it would not be a breaking change.Thisis in progress at[jashkenas/coffeescript#4352](https://github.com/jashkenas/coffeescript/pull/4352).
27
+
[Thishas been merged](https://github.com/jashkenas/coffeescript/pull/4352) and released as part of CoffeeScript 1.12.
28
28
29
29
##Medium Priority
30
30
31
31
These features aren’t required for CoffeeScript to be used in any project, but there’s great desire in the community for these to be added.
32
32
33
+
###Classes: Idiomatic ES Output[(#22)](https://github.com/coffeescript6/discuss/issues/22)
34
+
35
+
>CoffeeScript 2 only
36
+
37
+
Building off of the essential class-related items in Top Priority, this item is for the nonessential items like removing our dependence on`prototype` and`__super__`, and generally cleaning up our output and making it more idiomatic. This is where we would also add support for getters and setters[(#17)](https://github.com/coffeescript6/discuss/issues/17) and the`static` keyword. This is in progress at[jashkenas/coffeescript#4354](https://github.com/jashkenas/coffeescript/pull/4354).
Like triple quotes`"""` or`'''`, triple backticks```` ``````` would delineate a block of passthrough JavaScript code. This would enable template literals to work within backticked blocks,andalso provide a way to passthrough JavaScript code that might itself contain backticks (suchasin Markdown comments, or in ES2015 template literals).
49
+
[This has been merged](https://github.com/jashkenas/coffeescript/pull/4357)andreleasedaspart of CoffeeScript 1.12.
44
50
45
51
##Low Priority
46
52
@@ -50,7 +56,7 @@ These are nice-to-have features that should be implemented as time permits, prob
Output CoffeeScript’s interpolated strings—`"hello, #{name}!"`—as ES2015 template literals:`` `hello, ${name}!``` This is in progress at[jashkenas/coffeescript#4365](https://github.com/jashkenas/coffeescript/pull/4365)