Hacker News new | past | comments | ask | show | jobs | submit login

Why wouldn’t Zig be applicable anywhere where c is applicable? Afaik it can also compile to C as a target other than the many architectures it supports.



Zig did not compile to C, yet, and so is restricted to llvm's targets.



That's not released or finished, last I checked a few weeks ago.

Edit: Oh, looks like it was released just a few days after I last checked; ha. Although, it's not clear to me whether it's intended for end-user use yet.

https://github.com/ziglang/zig/releases/tag/0.8.0


Self-Reply addendum: on Discord the devs claim it's nowhere near ready for general use.


I think you can compile Zig to WASM, and then it's just a matter of finding a WASM interpreter/JIT in C.


... That would be terrible on, say, the Sega Genesis or 32X.


I don't see how it's more terrible than using Nim.


Nim is elegant, relatively safe, and not interpreted; its performance is within a stone's throw of C, and roughly on par with Zig; but with better safety guarantees.




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

Search: