5 ms·
"All code in Angular 2 is already being written in ES6. As ES6 doesn’t run in browsers today, we’re using the Traceur compiler to generate the nice ES5 that ru
by tectonic 13y ago
"All code in Angular 2 is already being written in ES6. As ES6 doesn’t run in browsers today, we’re using the Traceur compiler to generate the nice ES5 that runs everywhere. We’re working with the Traceur team to build support for a few extensions like annotations and assertions."
That's pretty cool.
- josteink 13y agoWhile "cool" and "clever" and any other half-positive adjective you like, it does mean things will literally be hell to debug until native ES6 support is available in current browsers. I thought the internals of Angular already had a reputation for being pretty horrible and indecipherable already. I doubt this will improve on any of that criticism.
- chadillac 13y agoThat's the reason I've not done anything more than dabble with it. My experiences building anything that wasn't Angular from the foundation up left me frustrated. This is great for XYZ, but I need to do AB123C... well... shit.
- EGreg 13y agoReally? Do you mean it's just super optimized and advanced, or coded badly? I kind of always assumed that famous libraries built by a team of open source geniuses would be super tight and tested for major errors and performance inefficiencies. No snark, I really did think this. Of course, Wordpress and Drupal do seem to have a lot of crazy architectural decisions that made maintenance difficult, so maybe I am just completely off. Here are two JS files from a framework that I've written myself over the past few years, for my own use. Is the angular source code pretty much like this, or much more optimized? https://github.com/EGreg/Q/blob/master/platform/plugins/Q/web/js/Q.js https://github.com/EGreg/Q/blob/master/platform/plugins/Q/we... https://github.com/EGreg/Q/blob/master/platform/plugins/Streams/web/js/Streams.js https://github.com/EGreg/Q/blob/master/platform/plugins/Stre...
- egeozcan 13y agoIt seems that they go as far as creating their own benchmark tool to optimize their performance[1]. They also seem to have a logging tool in the works just to expose the stuff going on under the hood[2]. [1]: https://docs.google.com/file/d/0BwftRCZoTFiyRzhnVml3dlRiR1A5NEVscEl0UVlXZlNIRktZ/edit https://docs.google.com/file/d/0BwftRCZoTFiyRzhnVml3dlRiR1A5... [2]: https://github.com/angular/diary.js https://github.com/angular/diary.js
- chc 13y agoWhy does this necessarily mean things will be more hellish to debug than Angular alone?
- ekidd 13y agoI write Ember applications using CoffeeScript plus ES6 module extensions, and everything gets transpiled down to JavaScript. And yet, I find it pretty easy to debug the generated code: It looks more-or-less like what I wrote, it's nicely indented, and there's just a little extra boilerplate here and there. Do you have any reason to believe that the Traceur compiler generates unreadable output with Angular?
- haberman 13y ago> things will literally be hell to debug The word "literally" has officially lost all meaning.
- xweb 13y agoWhat do you mean by 'The word "literally"'? I don't understand.
- lutusp 13y agoHe may mean the word no longer has a clear meaning -- it also means "figuratively". Which means it can't be relied on to have any meaning at all. http://www.merriam-webster.com/dictionary/literally http://www.merriam-webster.com/dictionary/literally 1 : in a literal sense or manner : actually <took the remark literally> <was literally insane> 2: in effect : virtually <will literally turn the world upside down to combat cruelty or injustice — Norman Cousins>
- dllthomas 13y agoWell, in either case it is meant to strengthen.
- skeletonjelly 13y agoErr..Am I missing a joke? I think they literally mean the word "literally"
- lutusp 13y agoThat may be, but the rug has been pulled out from under "literally". One will never again be able to assert something ... literally ... and expect to be believed. http://www.merriam-webster.com/dictionary/literally http://www.merriam-webster.com/dictionary/literally 1 : in a literal sense or manner : actually <took the remark literally> <was literally insane> 2 : in effect : virtually <will literally turn the world upside down to combat cruelty or injustice — Norman Cousins>
- Cthulhu_ 13y agoOn the one side, yes; on the other though, it's a shame that the technologies we use or want to use for web applications right now (HTML5, ES6, etc) are just not done, standardized or implemented yet. JS not good enough? We'll invent new languages; Dart, Typescript, Coffeescript, etc. ES6 not yet done? We'll build a transpiler so we can fiddle with it until it's done - if ever. I just wish the standardisation processes for web technologies would go faster. We get small revolutions every 2 years or so, but the standards behind them only get updated every decade.