Hacker Newsnew | past | comments | ask | show | jobs | submit | thelgevold's commentslogin

I kept it simple to try to illustrate the main difference between the two approaches.


Babili actually has a pretty complete comparison which compares the compression rates of major libraries.

https://github.com/babel/babili


There is a flag to tell it to process commonJS. I played with that here: http://www.syntaxsuccess.com/viewarticle/combining-es2015-mo...

Combining es6 and commonJS in the same project.


Closure definitely has a steeper learning curve. I also agree that it's not always realistic to use it.


I'd say the learning curve is insurmountable.

- The official docs are basically non-existent.

- If you're lucky enough to realize that GitHub wiki has better docs, good luck figuring them out.

- Even though the support for node_modules is kinda finally there, it's still impossible to figure out how to reliably set the compiler in a way that recognizes them.

My old-ish rant about this: https://gist.github.com/dmitriid/7bd6f2c10d263bae40e0addc7ed...


I have a comparison using an Angular app here: http://www.syntaxsuccess.com/viewarticle/angular-application...



Thanks, apparently I already saw that! Since one comment there is mine.


Yes. Angular is working on a similar approach. Great results so far.


I read there was a TypeScript Compiler that would output CC copatible type annotation comments.


Tsickle by Angular does that: https://github.com/angular/tsickle

It wraps the TypeScript Compiler and outputs CC compatible type annotation comments.


- It's being built by a handful of people (I remember seeing the original author complain he doesn't really have the time for it)

- It's a hack on top of TypeScript compiler

- It gets broken by TypeScript upgrades and is usually several weeks behind TS version upgrades.

I'd be really wary using it in production


[author here]

- Pretty much everything you use (e.g. Angular or React or Babel or Webpack or equivalents in other languages) is being built by a handful of people

- It interacts with TypeScript in a way that tends to be more sensitive to changes, but being some weeks behind the latest release of a compiler is not the end of the world, and we do continuously upgrade

I agree you should be wary of using it in production though because it's not really user-friendly yet. Though if you can figure it out it does work and some people are successfully shipping some apps.


I sounded curt, but I think tsickle is awesome.

I can't justify bringing it in in our current setup though :(


It's unfortunate that the JS framework debate is so biased and subjective. I personally like to play around with several of the frameworks. My conclusion is that all the major players are of comparable quality (Angular, React, Aurelia etc). I think it really comes down to how you use the framework, rather than which one you end up with.


I'm currently using both Angular 2 and React concurrently. I've previously used Angular.

There are some points where I feel the opinionated aspects of Angular 2 makes things marginally quicker. However, the one thing I find most consistent is that issues with ng2 seem to frustrate me more than issues with React.

It seems that the this might be a combination of quality and length of tracebacks in ng2. Quality seems to be spotty (sometimes very helpful, sometimes not), and the length of tracebacks in a ready-for-prod project are easily enormous (although sometimes only small). Leading to much more frustration while trying to find what the issue is - probably a matter of not declaring a service in a module or something.

Similarly, the whole injection and declaration process feels tedious and unnatural to me, compared to React, where you just import components from wherever you'd like and use them.

They both work fine, I'm just noticing that my frustration level is generally lower with React. I'm curious how it is for others that are using both concurrently, to compare.


I definitely agree that there is a bit of a learning curve to Angular. A big pivot for people who are used to version 1.

The thing I like the most is how they are pushing the framework to reduce the footprint. In the upcoming version (4) they have made even more progress on this. There are also plans to introduce the Closure compiler in the build chain, which will lead to further optimizations.


Blog about JavaScript topics like frameworks and web performance: http://www.syntaxsuccess.com/


Does it show up as ES5 functions? I down transpile it to ES5. Search for BMW and Joe Smith.


Yeah, I would use it sparingly :-) Mostly to still allow existing jQuery plugins.


It was accidentally committed commented out for debugging, but the numbers from the experiments use uglify and gzip. Updated the repo as well now.


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

Search: