5 ms·
>There is no way to handle complex UIs in the browser without JavaScript Dart, ClojureScript, TS (technically JS superset but still a considerable improvement)
by moonchrome 11y ago
>There is no way to handle complex UIs in the browser without JavaScript
Dart, ClojureScript, TS (technically JS superset but still a considerable improvement) are just the ones I've used.
And I'd rather use both of them on server (Dart/Clojure) than JS.
There are other languages as well.
ES6 is a pain in the ass - no browser supports it and using transpilers + polyfills and the JS build/package tools to set that up is a PITA that only grows as you add dependencies and it bloats your code size to be comparable or larger than the compile-to-JS languages without making the language significantly better.
- enkephalin 11y agodo you honestly believe that ES6 is not an improvement for javascript? if so, why?
- moonchrome 11y agoIt's an improvement - but at this point ES6 is just another compile-to-JS language that needs to ship it's own standard library - except it's worse than all of the mentioned ones (it has no type checking, standard library is still meh, semantics are still good old JS semantics).
- krisdol 11y agoWhat do you mean it's a compile to js language? I use ES6 with no transpilers.
- TranquilMarmot 11y agoSame here; I guess it really depends on who your target market is. So far, all the ES6 I've written works just fine in Chrome, Firefox, Safari, Opera, and Edge. The only browser that breaks everything is Internet Explorer, but it seems like general consensus these days is that IE is only used in enterprise applications where you're locked into it.
- qwertyuiop924 11y agoWhere are all the people who like dynamic languages? Do they just hide while other people duke it out over this? It just seems like everybody except me hates dynamism sometimes.
- EvanPlaice 11y agoI think ES6 is just in its in-between phase of adoption. The mainstream hasn't fully adopted it yet. As for the rest... The Coffeescript converts have moved on from the 'one true language' now that ES6 cherry-picked most of the good parts and people started realizing that CS source maps are buggy/inconsistent. Standards are for 'plebs' so they've moved on to the new shiney. By new shiney, I mean mimicing FP in Javascript and looking down on people who can't ELI5 monads and functors. Despite not being able to ELI5 monads and functors. Typescript, is really geared toward OOP devs who live in an IDE and compulsively twitch an invisible set of CTRL-SPACE keys when they get nervous. It's a well-known fact that Google is a OOP- heavy Java/C++ shop who have been developing algos in Java/C++ since their last CS course where they developed algos using Java/C++. It's within their best interest to get all of there desktop devs to convert to writing desktop apps on the web before all that penis pills/local singles ad money runs out. It's only a matter of time before we see the first JS AbstractFactoryFactoryServiceProvider class in the wild. Angular2 has made considerable progress on this front so far. /satire Honestly, I really enjoy ES6. The JS dev communities favorite past time is ragging on how ridiculously bad JS is. ES6 isn't bad so it's not worth talking about. The new features introduced in ES6 are pretty conservative. They consist of good concepts poached directly from popular superset languages or sensible additions that fit in nicely with the usual JS style. The really interesting additions are still in the specification phase. Additions, such as the new ES6 module and loader standard, decorators, native HTTP fetch, etc... As long as new standards are being introduced, transpiling will continue to be a requirement. I think it's cool that people can create and use new supersets of JS. It beats having to listen to them whine about how 'Javascript isn't exactly like some other language that I really like to use.' In a way it's the first democratic programming language. Instead of dictating what people should and shouldn't use, people are free to migrate around to different communities until they find one that more closely matches their worldview. Everybody follows the same baseline standard but there's a lot of legroom for differentiation. Why axegrind over our differences when we can celebrate them and start working together.
- tzaman 11y agoYeah, but what % of frontend developers use Dart, CS or TS? Not as big as you think. And no browser supports any of them, yet, including ES6. So you always have to transpile to vanilla JS, whether you use ES6 or ClojureScript. Don't get me wrong I think all those experiments (if I may) are nice, but if I were to develop an interface in Dart/CS/TS today, I'd have serious problems hiring people that know one of those tomorrow.
- gisenberg 11y agoES6 support in modern browsers is pretty okay (see: https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/). It doesn't eliminate the need to transpile, but it looks like transpiling may not be necessary forever.
- Wintamute 11y agoWhy is transpiling ES6 any more of a PITA than transpiling Clojurescript? ES6 to ES5 is a one shell command with Babel. And TS is ES6 but with type annotations. And ignore all of the myriad of high quality plain JS modules on npm at your peril. I like Dart and ClojureScript too, but I've really enjoyed working on ES6 and ES5 projects too. I don't doubt your Dart and ClojureScript credentials, but your comment betrays ignorance of ES6 and the plain JS ecosystem.
- moonchrome 11y ago>ES6 to ES5 is a one shell command with Babel. You still need to include core.js to polyfil basically everything from standard library. And then you need to make sure Babel works with your framework (like Polymer or what not), and that's just the start of the interop hell that is using different JS libraries together. Rule of thumb - anything you add to your JS build system = increase in the likelihood of hair pulling when things break - and babel and core.js are two such things. The value I get from ES6 compared to the CLJS change how much I'm willing to tolerate the PITA factor of the build system. In dart I don't have to do any of that, just add few lines to pubspec.yaml with dependencies and transform directives and off I go. And every other library uses the same build system and the same package manager and the same standard library !
- pfooti 11y agoI have not found that to be the case. I run my code through gulp-babel and done. There is no runtime AFAIK, although there was one for traceur. I have also had no real problems interopping with other big libraries. I think the biggest point of discontinuity would be the class keyword vs other class-like libraries (like coffeescript's implementation). Even that's not too bad, I'm able to extend those using es6 class syntax, I just need to be careful about calling super and setting up the constructor properly.
- rhinoceraptor 11y agoES6 is pretty straightforward. You use Browserify or Webpack with Babel, and set it up to build with Gulp or Grunt. I don't see how using Dart, TS, etc. make it any asier, and with the setup I just described, you're using Javascript top to bottom. I have an Angular project set up this way, and that allows me to run the unit tests in Node on the command line.