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

Why not compile directly to C in step one, if you’re already presuming the presence of a zig compiler?


>Compile the compiler to C code - This is the approach taken by Nim, for example.

>In Zig’s case, I explored this possibility, and found the generated C code to not only be target-specific, but also large.

Even ignoring the large-ness, the fact that it was target-specific makes it unusable for bootstrapping new targets.

The WASM blob is target-independent.




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

Search: