├── Reference.md ├── Code of Conduct.md └── README.md /Reference.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | ## Relevant Discussions 4 | - https://github.com/jashkenas/coffeescript/issues/4078 5 | - https://github.com/jashkenas/coffeescript/issues/3162 6 | - https://github.com/jashkenas/coffeescript/issues/4228 7 | - https://github.com/jashkenas/coffeescript/issues/3832 8 | - (might as well scroll through https://github.com/jashkenas/coffeescript/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20es6 ) 9 | - https://github.com/michaelficarra/CoffeeScriptRedux/issues/336 10 | - https://github.com/michaelficarra/CoffeeScriptRedux/issues/338 11 | 12 | ## Possible Alternatives 13 | There are a number of interesting new languages that have sprung up, some of them listed below. None seem to capture the essence of "unfancy JavaScript" accomplished in CoffeeScript, but may be sources of inspiration nonetheless: 14 | 15 | - [LiveScript](http://livescript.net/) – Extremely feature-rich, closest to CoffeeScript I've seen, functional-oriented 16 | - [Earl Grey](http://www.earl-grey.io/) – Python-ish with macros 17 | - [PureScript](http://www.purescript.org/) – Haskell-based, recommended by @michaelficarra (author of CoffeeScriptRedux) 18 | - [Elm](http://elm-lang.org/) – Haskell-based, only works in the browser. 19 | - [Frappe](https://github.com/lydell/frappe) (just an idea) 20 | - [TacoScript](https://github.com/forivall/tacoscript) (in the early stages) -------------------------------------------------------------------------------- /Code of Conduct.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | * advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a public 32 | * setting with the interest of working on common goals 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | Any such action must be accompanied by a public notice declaring that such an 47 | action was taken and explaining why. 48 | 49 | ## Scope 50 | 51 | This Code of Conduct applies both within project spaces and in public spaces 52 | when an individual is representing the project or its community. Examples of 53 | representing a project or community include using an official project e-mail 54 | address, posting via an official social media account, or acting as an appointed 55 | representative at an online or offline event. Representation of a project may be 56 | further defined and clarified by project maintainers. 57 | 58 | ## Enforcement 59 | 60 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 61 | reported by contacting the project team at 62 | [coffeescript6-abuse-report@mailinator.com](mailto:coffeescript6-abuse-report@mailinator.com). 63 | All complaints will be reviewed and investigated and will result in a response 64 | that is deemed necessary and appropriate to the circumstances. The project team 65 | is obligated to maintain confidentiality with regard to the reporter of an 66 | incident. Further details of specific enforcement policies may be posted 67 | separately. 68 | 69 | Project maintainers who do not follow or enforce the Code of Conduct in good 70 | faith may face temporary or permanent repercussions as determined by other 71 | members of the project's leadership. 72 | 73 | ## Attribution 74 | 75 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 76 | available at [http://contributor-covenant.org/version/1/4][version] 77 | 78 | [homepage]: http://contributor-covenant.org 79 | [version]: http://contributor-covenant.org/version/1/4/ 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CoffeeScript 6.0 2 | *CoffeeScript is dead – long live CoffeeScript!* 3 | 4 | ``` 5 | ,--. 6 | / .' 7 | . / -. 8 | _____ __ __ | .-. ' 9 | / ____| / _|/ _| ' \ | | 10 | | | ___ | |_| |_ ___ ___ .-`` \ `' / '-. 11 | | | / _ \| _| _/ _ \/ _ \ ( `----' ) 12 | | |___| (_) | | | || __/ __/ |`-..________ ..-'| 13 | \_____\___/|_| |_| \___|\___| | | 14 | | ;--. 15 | _____ _ _ | (__ \ 16 | / ____| (_) | | | | ) ) 17 | | (___ ___ _ __ _ _ __ | |_ | |/ / 18 | \___ \ / __| '__| | '_ \| __| | ( / 19 | ____) | (__| | | | |_) | |_ | |/ 20 | |_____/ \___|_| |_| .__/ \__| | | 21 | | | `-.._________..-' 22 | |_| 23 | 24 | ``` 25 | 26 | This repo intends to serve as a place to discuss the future of CoffeeScript, especially as it relates to ES2015+ (ES6). 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 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). 29 | 30 | ## Background 31 | 32 | CoffeeScript is losing marketshare. That matters because it becomes harder to choose CoffeeScript for a project when fewer people use it, and when there isn’t public support for the language and a community committed to supporting it as the JavaScript ecosystem evolves. Choosing CoffeeScript for a project can also be stymied if another essential piece of the project, especially its framework, is incompatible with CoffeeScript in some way. 33 | 34 | Many people were drawn to CoffeeScript because it offered features that JavaScript once lacked: classes, destructuring, fat-arrow functions, etc. Once ES2015 arrived and JavaScript (mostly) caught up, those people abandoned CoffeeScript back for the JavaScript they were more familiar with. Those people aren’t coming back, nor should we pursue them. With ECMAScript proposals and development proceeding at a rapid pace, we stand no chance of out-innovating the JavaScript community in inventing new language features. 35 | 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. 37 | 38 | ## Goals 39 | 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 been released 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). 41 | 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. 43 | 44 | **CoffeeScript should output as much ES2015+ syntax as possible, *as ES2015+*.** With the advent of Babel, there’s no need for CoffeeScript to reinvent the wheel in finding ways to convert ES2015 features into ES5 code. CoffeeScript should simply output modern ES2015+ JavaScript, and let downstream tools convert and polyfill for compatibility. The advantage of this is that CoffeeScript will always remain modern—as more and more runtimes support more and more ES2015+ features natively, and Babel adjusts to let more native code through to the final output, nothing is required on CoffeeScript’s part to take advantage of the shifting landscape. Debugging will also be easier, for example if a CoffeeScript fat arrow shows up in DevTools as an ES2015 fat arrow. And the CoffeeScript codebase itself will be simpler; compiling `=>` to `=>`, for example, will require far less code than the constructs the compiler creates now. And of course, our mantra: “It’s just JavaScript.” 45 | 46 | **While adding ES2015+ features, we should maintain as much backward compatibility as possible.** There’s a lot of code out there already written in CoffeeScript. We would do our community a disservice by introducing unnecessary breaking changes. Whatever one may think of the CoffeeScript syntax for existing features, that ship has sailed; there are millions of lines of code written in that syntax, and we owe it to our users to force as little refactoring as possible. 47 | 48 | **CoffeeScript “is just JavaScript,” but it has a core tenet of its own: elegant, concise syntax.** Now that ECMAScript has more-or-less feature parity with CoffeeScript, the CoffeeScript language’s primary selling point is its clean, spare syntax that eschews unnecessary code whenever possible. As we add new features, whether based on ES2015+ or original, we must strive to maintain CoffeeScript’s simple elegance. 49 | 50 | ## The Plan 51 | 52 | ### CoffeeScript 1.x 53 | 54 | New ES2015+ features that can be opt-in by using them and that don’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. 55 | 56 | ### [CoffeeScript 2](https://github.com/coffeescript6/discuss/projects/1) 57 | 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 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. You can also read [draft documentation for CoffeeScript 2](https://rawgit.com/jashkenas/coffeescript/2/docs/v2/index.html). 59 | 60 | ## Implemented Features 61 | 62 | #### Modules: `import` and `export` [(#7)](https://github.com/coffeescript6/discuss/issues/7) 63 | 64 | > CoffeeScript 1.x and 2 65 | 66 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4300) and released as part of CoffeeScript 1.11. 67 | 68 | #### Classes: Extend ES Classes, Idiomatic Methods, Idiomatic `super` [(#22)](https://github.com/coffeescript6/discuss/issues/22) 69 | 70 | > CoffeeScript 2 only 71 | 72 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4354) and [merged](https://github.com/jashkenas/coffeescript/pull/4424) into the `2` branch. 73 | 74 | #### Tagged template literals [(#28)](https://github.com/coffeescript6/discuss/issues/28) 75 | 76 | > CoffeeScript 1.x and 2 77 | 78 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4352) and released as part of CoffeeScript 1.12. 79 | 80 | #### `async`/`await` [(#10)](https://github.com/coffeescript6/discuss/issues/10) 81 | 82 | > CoffeeScript 2 83 | 84 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/3757) into the `2` branch. 85 | 86 | #### Backticked blocks [(#42)](https://github.com/coffeescript6/discuss/issues/42) 87 | 88 | > CoffeeScript 1.x and 2 89 | 90 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4357) and released as part of CoffeeScript 1.12. 91 | 92 | #### Template literals [(#41)](https://github.com/coffeescript6/discuss/issues/41) 93 | 94 | > CoffeeScript 2 only 95 | 96 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4365) into the `2` branch. 97 | 98 | #### Fat arrows `=>` output as `=>` [(#8)](https://github.com/coffeescript6/discuss/issues/8) 99 | 100 | > CoffeeScript 2 only 101 | 102 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4311) into the `2` branch. 103 | 104 | #### `for … of` [(#11)](https://github.com/coffeescript6/discuss/issues/11) 105 | 106 | > CoffeeScript 1.x and 2 107 | 108 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4306) and released as part of CoffeeScript 1.12. 109 | 110 | #### `get` and `set` keywords throw errors [(#17)](https://github.com/coffeescript6/discuss/issues/17) 111 | 112 | > CoffeeScript 2 only 113 | 114 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4484) into the `2` branch. 115 | 116 | #### Destructuring: Idiomatic output [(#69)](https://github.com/coffeescript6/discuss/issues/69) 117 | 118 | > CoffeeScript 2 only 119 | 120 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4478) into the `2` branch. 121 | 122 | #### Destructuring: Object spreads 123 | 124 | > CoffeeScript 2 only 125 | 126 | [This has been merged](https://github.com/jashkenas/coffeescript/pull/4493) into the `2` branch. 127 | 128 | ## Features to Implement 129 | 130 | All features that were goals for CoffeeScript 2 have been implemented! As soon as we’re done testing for bugs, 2.0.0 will be released. 131 | 132 | ## Not in Scope 133 | 134 | These are other features that have been discussed, but the consensus at the moment is that no action should be taken to implement them: 135 | 136 | #### Block assignment `let` and `const` assignment operators [(#31)](https://github.com/coffeescript6/discuss/issues/31) or [(#35)](https://github.com/coffeescript6/discuss/issues/35) 137 | 138 | #### Inferred `let` assignment [(#1)](https://github.com/coffeescript6/discuss/issues/1) 139 | 140 | #### Decorators [(#9)](https://github.com/coffeescript6/discuss/issues/9) 141 | 142 | #### Type annotations [(#12)](https://github.com/coffeescript6/discuss/issues/12) 143 | 144 | ## Open Questions 145 | 146 | 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. 147 | 148 | If you disagree with any part of this document, please [open a pull request](https://github.com/coffeescript6/discuss/pulls) with a suggested revision and we can discuss it. 149 | --------------------------------------------------------------------------------