Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"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.




While "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.


I 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?


Really? 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/we...

https://github.com/EGreg/Q/blob/master/platform/plugins/Stre...


It 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/0BwftRCZoTFiyRzhnVml3dlRiR1A5...

[2]: https://github.com/angular/diary.js


> things will literally be hell to debug

The word "literally" has officially lost all meaning.


What do you mean by 'The word "literally"'? I don't understand.


He 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

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>


Well, in either case it is meant to strengthen.


Err..Am I missing a joke? I think they literally mean the word "literally"


That 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

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>


I've taken to repeating it twice. For example, "When the board saw the CEO's plans for the company-wide reorganization, they literally-literally cut him off at the knees"

(As in, they drew a sword and severed his limbs, such that literal-literal blood was everywhere)

Very sad.


Why does this necessarily mean things will be more hellish to debug than Angular alone?


That'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.


On 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: