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

The things you seem to be worried about are configurable in the tsconfig. You can stay as polyfill free as you would like by instructing the Typescript compiler to error out instead of making the glue for you. Aside from the inescapable quirks of runtime JavaScript, Typescript felt pretty intuitive to me when transitioning to a new job from C# previously. Typescript with ESLint is about as solid as you’re going to get with JavaScript. I know that ideally there’d be something better, but in the real world right now this is the best it gets. At some point reality and business constraints are going to slam into ideations and things are going to get a bit dirty.

Aside from that, no matter what you pick, standard Typescript configs are absolutely compiling to JavaScript, not any other step in the interpreting process. It doesn’t matter if it’s taking your async/await and polyfilling it to run on an older browser engine… it’s still producing 100% JavaScript.

It goes Typescript -> JavaScript during the build, and the JS is what gets distributed to clients.

The JavaScript produced by TS is sent to the browser which performs the same JavaScript -> abstract syntax tree -> byte code -> execution, as usual



"standard Typescript configs are absolutely compiling to JavaScript"

You are missing the point. I want zero cost abstractions (for some level of abstraction - I accept e.g. there is a CPU and a browser). I don't care what it is compiling to.

Typescript is not a zero cost abstraction. (Zero cost meaning, here, that any overhead is incurred compile time only).

"The things you seem to be worried about are configurable in the tsconfig"

That's terrible. I want the Z.C.A. to be by-default, not "configure the heck out of the language to make it so".


> That's terrible. I want the Z.C.A. to be by-default, not "configure the heck out of the language to make it so".

Don't you just set target? Is there even a default for target?




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

Search: