calband / calchart-viewer

An online show viewer and continuity generator for Calchart.
calband.github.io/calchart-viewer/
2 stars 2 forks source link

Class syntax #170

Closed brandonchinn178 closed 8 years ago

brandonchinn178 commented 8 years ago

@noahsark769 Javascript apparently supports a class syntax thats basically just syntactic sugar over inheritance and prototypes. It's supported on all the latest browsers (except IE?) but potentially not supported if people have older versions? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

I think it'd make the project a lot easier to dive into for people who may not be used to the prototype syntax. Thoughts?

noahsark769 commented 8 years ago

@brandonchinn178 I would discourage against doing this. ES6 still has limited support across browsers, and while I don't think we really need to support internet explorer that much, I don't think it's s good idea to totally shut IE out.

Secondly, I would worry that using class syntax would make it harder to understand js's prototype system, which still exists regardless of syntax.

Thirdly, since there is not much development on the viewer right now, I don't think we should change anything that doesn't need to be changed.

We can look into babeljs for support if we get more development going! On Thu, Jan 14, 2016 at 3:14 PM Brandon Chinn notifications@github.com wrote:

@noahsark726 Javascript apparently supports a class syntax thats basically just syntactic sugar over inheritance and prototypes. It's supported on all the latest browsers (except IE?) but potentially not supported if people have older versions? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes

I think it'd make the project a lot easier to dive into for people who may not be used to the prototype syntax. Thoughts?

— Reply to this email directly or view it on GitHub https://github.com/calband/calchart-viewer/issues/170.

brandonchinn178 commented 8 years ago

:+1: I think using babel when compiling with grunt would be perfect; we don't care about the output anyway. Maybe even minify the output?

noahsark769 commented 8 years ago

Yeah, might as well minify it haha. The only thing about minifying is that you need an option to not minify, in case you want to debug something in the compiled output.

brandonchinn178 commented 8 years ago

im sure grunt has an option for that

noahsark769 commented 8 years ago

There's a plugin I believe :D