Skip to content

Migrate to es6 #11

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

Closed
alimd opened this issue Jul 26, 2015 · 10 comments
Closed

Migrate to es6 #11

alimd opened this issue Jul 26, 2015 · 10 comments

Comments

@alimd
Copy link
Contributor

alimd commented Jul 26, 2015

I want to rewrite code to es6 with babeljs.
Make a pull or own repo ?

@mast
Copy link
Owner

mast commented Jul 27, 2015

I want to keep it as node.js module, and as far as I know es6 is very poorly supported by nodejs right now.
So there are 2 options:

  • we do that as separate branch, or
  • you do it as separate repo

@alimd
Copy link
Contributor Author

alimd commented Jul 27, 2015

Please check this website babeljs.io
I think you don't really know it
It fully compatible as a simple node.js module

On Mon, Jul 27, 2015, 6:14 PM Max Stepanov [email protected] wrote:

I want to keep it as node.js module, and as far as I know es6 is very
poorly supported by nodejs right now.
So there are 2 options:

  • we do that as separate branch, or
  • you do it as separate repo


Reply to this email directly or view it on GitHub
#11 (comment)
.

@derhuerst
Copy link

Even though using babeljs with regular Node.js is possible, why not wait until ES6 is natively supported?

@alimd
Copy link
Contributor Author

alimd commented Jul 27, 2015

Es6 work a polyfill in next 3 years
And babeljs not a converter it rub es6 on the fly
Check my bot source code and read more about babeljs and/or typescript
https://github.com/AliMD/OneCastBot

On Mon, Jul 27, 2015, 10:19 PM Jannis Redmann [email protected]
wrote:

Even though using babeljs with regular Node.js is possible, why not wait
until ES6 is natively supported?


Reply to this email directly or view it on GitHub
#11 (comment)
.

@derhuerst
Copy link

Es6 work a polyfill in next 3 years

What do you mean by that?

And babeljs not a converter it rub es6 on the fly

It is a converter. It works like coffee-script/register.

@alimd
Copy link
Contributor Author

alimd commented Jul 27, 2015

Check my repo, it's work without convert, not like coffee
For example let work as let not as a var

On Mon, Jul 27, 2015, 11:45 PM Jannis Redmann [email protected]
wrote:

Es6 work a polyfill in next 3 years

What do you mean by that?

And babeljs not a converter it rub es6 on the fly

It is a converter
https://github.com/babel/babel/blob/master/packages/babel/src/api/register/node.js.
It works like coffee-script/register
https://github.com/jashkenas/coffeescript/blob/master/lib/coffee-script/register.js
.


Reply to this email directly or view it on GitHub
#11 (comment)
.

@mast
Copy link
Owner

mast commented Jul 27, 2015

Ok, I got it now. So we can create es6 code and use babeljs for getting it executed with node at run time (as I see you managed to get it working in your referred repo).
Mainly I agree with @derhuerst and probably it's better to wait for native es6 support. But give me a chance to think about it a little bit more.
By the way what benefits of using es6 in bot api you see, @alimd ?

@derhuerst
Copy link

@alimd

Check my repo, it's work without convert, not like coffee

In your repo, you require babel/register, which registers a hook that converts ES6 into ES5 (on the fly), just like CoffeeScript.

Es6 work a polyfill in next 3 years

Since io.js is close to 3.0.0 and brings native ES6 support, I don't think it's going to be 3 years, rather a few months. That's the reason I propose to wait with the migration until ES6 is natively supported.

@alimd
Copy link
Contributor Author

alimd commented Aug 2, 2015

sorry, 3 years just for browser not node ;)
By the way i start it as my own repo and will continue this conversation after some time
Thank you

@alimd
Copy link
Contributor Author

alimd commented Sep 19, 2015

@derhuerst
Its time to use es6 ;)

@alimd alimd closed this as completed Apr 15, 2016
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

3 participants