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

Seems silly to write what already exists in C. Just compile with Emscripten.


Sure, because everybody wants a 2-10MB additional download of mangled transpiled Javascript code for their app.


You do realize that Emscripten compiled code will be way smaller and faster than the equivalent JS code. Because C has static typing.


You do realize that static typing has nothing to do with code size (where did you get that bizarro idea from?).

Emscripten transpiled code is a bloated of redundancy in order to cover C constructs in Javascript code, for things that can be done shorter in idiomatic javascript. But you don't have to take my word for it. Check emscripten transpiled stuff that's out there and their sizes (even compared to the equivalent executable binaries for the same code).

Faster it might be (if it uses asm.js style tricks), but have you profiled to ensure that speed is lacking on that particular codebase we're talking about? Or that you can't just have a minimal asm.js/emscripten style base core and do the higher level stuff in pure high level js?


You make the claim that pure JS would be smaller than Emscripten compiled JS because of having to support C constructs in an awkward manner. This might be somewhat true in regard to pointers but not enough to make a difference. Please show some example codes




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

Search: