4 ms·
Clojurescript a lot of its success to the use of the Google Closure compiler, which really shines when you transpile because you can ensure that the resulting j
by macmac 10y ago
Clojurescript a lot of its success to the use of the Google Closure compiler, which really shines when you transpile because you can ensure that the resulting js is suitable for the Closure compiler.
- thelgevold 10y agoYes. Angular is working on a similar approach. Great results so far.
- k__ 10y agoI read there was a TypeScript Compiler that would output CC copatible type annotation comments.
- bearforcenine 10y agoTsickle by Angular does that: https://github.com/angular/tsickle https://github.com/angular/tsickle It wraps the TypeScript Compiler and outputs CC compatible type annotation comments.
- dmitriid 10y ago- 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
- evmar 10y ago[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.
- dmitriid 10y agoI sounded curt, but I think tsickle is awesome. I can't justify bringing it in in our current setup though :(
- sjrd 10y agoScala.js also uses GCC, of course. However, though it's definitely great at shaving off code size, we found that it can have a (sometimes significant) negative impact on runtime performance. Also, we seem to run into correctness bugs more often that we would like. I guess we are really stressing it.