Search posts, tags, users, and pages
I think typescript is a nice choice, it's one of the angular 2 supported languages or scripting language and i don't think it's only the hype if google go with it, for other side ES6 and more it's cool because it's the new features of javascript.
I've previously dabbled a little bit with ES6 and it looks good. Just I don't really see the point of using it too much when browsers don't support it yet - apart from a bit in chrome. I have heard that it does compliment Angular 2 quite well but I won't be using Angular or React/similar frameworks.
Is it worth building the project in ES5 then convert it into Typescript with babel and ES6?
Well i think if you use ES6 convert directly in js no ts. Now ts relased the version 2 that align with ES6, this is very interesting plus new features. If you not using a framework i think using ES6 or TS is nice :)
@hipkiss91 ES6 is not a language, it's a standard. JS is a language. JS is built on the ES specifications. So it does not make a whole lot of sense to transpile a standard to a language to another language. Also it does not make sense to convert an older version to a later version. You should rather do it the other way around!
@sdecandelario same for you; what we commonly call "ES6" here on Hashnode is just JS (based on ES6; also called JS2015). So it does not make any sense to transpile JS to JS. It already is JS. It makes sense to transpile JS based on ES6 to JS which is based on ES5 for older browsers, though (which is what Babel does)
@maruru but ES6 is executable in all the browsers? the next is ES7?
@maruru I know ES6 is a standard. But you can choose whether or not you want to use it. Perhaps my wording was off, I didn't mean convert backwards and forwards, as you said, but rather the other way round. Apologies for the confusion.
@sdecandelario not all browsers support ES6 yet, or ES7.
So, in clarifcation on your point @maruru what I meant by transpile, and I think what @sdecandelario meant was ES6 to ES5.
Yes i want to say transpile Es6 to Es5 that is actually that all browsers use :)
@sdecandelario I will not use any short forms or abbreviations in this comment, so you understand everything a little better.
JavaScript (JS) is a language, based on ECMAScript (ES). Whenever ECMAScript gets an update, JavaScript also gets an update since it JavaScript should always support the latest standard. Currently, we have ECMAScript Version 6. The JavaScript version based on ECMAScript 6 (ES6 for short) is called JS2015 or JS2016, depending on who you ask. It is the version superseding JavaScript v1.8.5, which was based on ECMAScript 5 (ES5).
ECMAScript (ES) is a standard. It is the foundation for many languages, like JavaScript, TypeScript, JScript, QtScript. All these languages essentially have a set of features defined by ECMAScript, but may add their own additional flavors, like types.
As a result: No, ES6 is not executable. JS2016 is. The next standard is ECMAScript 2017. No one knows the name of the JavaScript version which will build on that standard, but I guess it will be JS2017 or JS2018. All major browser support most features of JS2016 in their latest versions.