Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert CoffeeScript to ES6 please #34

Open
jimmywarting opened this issue Jan 2, 2017 · 12 comments
Open

Convert CoffeeScript to ES6 please #34

jimmywarting opened this issue Jan 2, 2017 · 12 comments

Comments

@jimmywarting
Copy link

No description provided.

@snd
Copy link
Owner

snd commented Apr 24, 2017

i'll do this eventually

@quko8
Copy link

quko8 commented Sep 28, 2017

updates?

@cferdinandi
Copy link

This feels like a step backwards to me. ES6 means transpilers or polyfills become required for broader browser coverage.

Right now you could start using this with an inline <script> tag if you wanted to.

@chucksellick
Copy link

This does a pretty good job of auto conversion, just needs some cleaning up after: http://decaffeinate-project.org/

@jimmywarting
Copy link
Author

This feels like a step backwards to me. ES6 means transpilers or polyfills become required for broader browser coverage.

@cferdinandi You are compiling either way. You might as well use babel instead. The broadest skill all web developer have in common is plain javascript it is here to stay. And more will contribute to the code. coffeescript will always be one step behind javascript. you couldn't use async await when it came out. you had to wait for CS to adopt to it.

@cferdinandi
Copy link

I'm not advocating coffee script. I'm a vanilla JS evangelist. I'm simply arguing for ES5 until ES6 has broader support.

What advantage does ES6 bring to the script?

@jimmywarting
Copy link
Author

@chucksellick
Copy link

ES6 is fully supported in all major browsers and in node.js. Many of the language features I personally used to use CoffeeScript for are now supported natively in ES6 (arrow functions and classes are the two major ones).

ES6 has way better editing and debugging experience in most major editors than CoffeeScript. More developers know JavaScript than CoffeeScript, hence a lower maintenance burden.

@cferdinandi
Copy link

Afterthought: I realize the responses to my comments are driven by this being an issue about CoffeeScript. When I first read it, I missed the part about CoffeeScript and assumed the ask what just to update from ES5 to ES6.

@chucksellick This makes perfect sense:

More developers know JavaScript than CoffeeScript, hence a lower maintenance burden.

tldr: I'm a dumbass, missed the thing about CoffeeScript, and agree 100%, so long as the end product is converted to ES5.

@chucksellick
Copy link

chucksellick commented Dec 27, 2017

The usual strategy is to distribute the npm package with multiple ES5 transpiled versions of the library (different versions to target different module loaders; CommonJS, UMD, etc), as well as the raw ES6 source. This way the environment can decide which version is most appropriate, with ES5 being the default. ES6 can be run in environments where it's supported natively (e.g. modern node) and bundlers can also use ES6 as they might only transpile a subset of ES6 features if they are targeting newer browsers.

What real advantages does ES6 bring to the table over ES5? Cleaner and therefore more maintainable source code is the only really tangible thing I can actually claim!

@snd
Copy link
Owner

snd commented Jan 22, 2018

i agree.

i'll do the conversion to ES6 before the end of february since this package is seeing some use and several people want this. i've been using ES6 and babel extensively over the last couple of years so this shouldn't be a big deal.

when i started work on this package back in 2012 there were good reasons to use coffeescript. today there aren't any imo. continuing to use coffee makes it harder for others to contribute.

The usual strategy is to distribute the npm package with multiple ES5 transpiled versions of the library (different versions to target different module loaders; CommonJS, UMD, etc), as well as the raw ES6 source. This way the environment can decide which version is most appropriate, with ES5 being the default. ES6 can be run in environments where it's supported natively (e.g. modern node) and bundlers can also use ES6 as they might only transpile a subset of ES6 features if they are targeting newer browsers.

What real advantages does ES6 bring to the table over ES5? Cleaner and therefore more maintainable source code is the only really tangible thing I can actually claim!

100% agree.

thanks for the links

@thiamsantos thiamsantos mentioned this issue Jan 22, 2018
Closed
@vlaraort
Copy link

vlaraort commented Oct 9, 2020

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants