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

Update all code to use ES6 #10

Open
bchuckles opened this issue Jan 9, 2018 · 9 comments
Open

Update all code to use ES6 #10

bchuckles opened this issue Jan 9, 2018 · 9 comments

Comments

@bchuckles
Copy link

Guys, I am a long time follower and finally have transitioned into more of a manager/lead role and miss coding. I would love to jump in update everything to ES6 and start writing some mocha test. Do you guys mind?

@bchuckles bchuckles changed the title Could I update all code to use ES6 Update all code to use ES6 Jan 9, 2018
@RabeaWahab
Copy link

RabeaWahab commented Jan 9, 2018

We started this discussion on a PR, and this seems to be a more fit place.

I would suggest moving it to TypeScript, more strict and lets you compile to whatever node version that fits your needs.

@bchuckles
Copy link
Author

Thats a great point. I can get down with that.

@beogip
Copy link

beogip commented Jan 10, 2018

Hi @RabeaWahab, I'm new in the Verge community! I really do not see the benefit of using TypeScript in Nodejs. I think if we want to use a statically typed language we would use another one like Scala or Java. I think that using TypeScript or Flow must be used only in Front-End.
Maybe using Nodejs LTS with the current support of ES6 it's the cleanest solution.
Sry for my english.

@benammann
Copy link

@beogip

thats correct, we should keep this repository verry clear and simple. More compilers make it more complicated

lets focus on

  • Writing JSDocs
  • Updating to ES6

@benammann
Copy link

i'm currently working on a local branch, gonna push this one tomorrow

@RabeaWahab
Copy link

RabeaWahab commented Jan 12, 2018

@benammann @beogip The idea is to have this module available in whatever ECMAScript standard run by the customer or client of this module, expecting that every server is running LTS is not the case for each business stack, and as there is tools to recompile I think TypeScript gives that out of the box plus the DuckTyping, etc. I am looking at it from a different non-tech angle, to be attractive to use, don't take the idea as a personal preference. I can work with anything 😄

@beogip
Copy link

beogip commented Jan 12, 2018

@RabeaWahab you are right we can't expect that every server is running LTS but using TypeScript in NodeJs it's not the best option (as I explain in my prev comment). We must have full control of the code that we provide, if we use a transpiler (TypeScript, Flow, Babel) we lost that control. Maybe the most sincere is keep using ES5.
I think we should focus on

  • Writing JSDocs
  • Writing missing tests

What do you think?

@bchuckles
Copy link
Author

@beogip I think that would be a mistake. ES5 is already outdated, I dont think Babel makes you lose control. Also, ES6 saves you a lot of logic with deconstruction, and better scope. Purely from a snob perspective, if I see ES5 it looks like they are not up to date on the JS world. I did have hesitation with TypeScript and Node, but I can also work with anything.

@RabeaWahab
Copy link

@beogip @bchuckles I would go then with ES6 and let the user figure out how to handle his environment, or provide examples of transpiling it to some other standard.

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

4 participants