Skip to content
This repository was archived by the owner on Feb 19, 2018. It is now read-only.
This repository was archived by the owner on Feb 19, 2018. It is now read-only.

CS2 Discussion: Question: Opt-in ESNext features in 1.x #40

Closed
@carlmathisen

Description

@carlmathisen

First off, congratulations to everyone working on import/export making it into master of CoffeeScript 1.x. That is really great news! Have a look here (among a couple of other PRs) for the feature: jashkenas/coffeescript#4300

Obviously class is one of the most important ESNext features we have, and it is a breaking change. It needs to be in 2.0. I would like to make a case for other opt-in features however, such as import/export above, await and template literals, to be put into 1.x as well. It won't make a difference to existing 1.x codebases, because the features won't touch existing syntax. Like with import/export, they should be passed directly through - which means that the developer will need to add extra tooling to make it work in the browser.

The situation we have at work is that we have a large codebase with CS classes that is less than trivial to port to ESNext classes in CS2. It would be nice to use other opt-in ESNext features without having to do a full upgrade right away. I think we share this boat with many others.

I know @jashkenas is opposed to adding features to 1.x that won't work out of the (compiler) box and thus requires extra tooling, but we already went up against this principle when adding import/export support. By the way, writing ESNext with CoffeeScript in Node does not require extra tooling.

Note: Sorry if this topic is covered in another thread, but the discussion seemed to be scattered so I decided to start a new thread about this specifically. Please close if this topic has been decided on already.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions