planetoftheweb/electron

Awesome Course! But, Why not use EC6?

senderic opened this issue · 3 comments

Thanks for putting on this awesome course! It will directly help me in a project right now.

I am wondering though, why not use the latest EC6 standard for writing the Javascript code? Are there incompatibilities between using EC6 and Electron? Or was it just a personal choice?

Thanks. I tend to err on the side of clarity. I feel like some ES6 features like Arrow functions, let, const tend to be less clear than older javascript. I've seen too many demos where my brain is trying to deconstruct the shortcut arrow function code instead of focusing on what the author was actually trying to do. You'll probably see more ES6 code in my courses as time passes by. I do stress about this sort of thing a lot.

Sometimes, specially in react the ternary functions are essential to getting something done, so I use them then, but you'll often hear me explain them.

I noticed you did use ternary and some () -> {...} operations at times, they were well placed too -- I was thinking to myself "could it easily be done in classic JS?". I can also see what you mean by clarity, in retrospect, those language abbreviations can get in the way of understanding at times. I've been trying to use EC6 as much as possible this past year, but it actually took a bit of practice to get some of the nuances down. I could see it being a bit too early to base an advanced JS course on it.

Thanks for the course and Happy New Year!

The ternary statements are required a result of the way that JSX gets translated into JavaScript.