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

Your JS code is way uglier than their Go code, if you're doing those kinds of shenanigans.

JS is 10x-100x slower than native languages (C++, Go, Rust, etc) if you write the code normally (i.e. don't go down the road of uglifying your JS code to the point where it's dramatically less pleasant to work with than the C++ code you're comparing to).



There's no such thing as a native language unless you're talking about machine code.

It's kind of annoying how even someone like Hejlsberg is throwing around words like "native" in such an ambiguous, sloppy, and prone-to-be-misleading way on a project like this.

"C++" isn't native. The object code that it gets compiled to, large parts of which are in the machine's native language, is.

Likewise "TypeScript" isn't non-native in any way that doesn't apply to any other language. The fact that tsc emits JS instead of the machine's native language is what makes TypeScript programs (like tsc itself) comparatively slow.

It's the compilers that are the important here, not the languages. (The fact that the TypeScript team was committed to making sure the typescript-go compiler is the same (nearly line-for-line equivalent) to the production version of the TypeScript compiler written in itself really highlights this.)




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

Search: