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

I’ve also ported the lox vm to Zig and had a great time working through it.

Since the project is designed in C, you can mostly write the exact same code in zig, with minimal modifications. If you want to use zig features, they’re easy to integrate, but Nystrom obviously won’t be giving you any hints.

But the language offers a lot of useful features (slices, optionals, error types) and makes some C paradigms syntactic realities (tagged enums, explicit pointer casts). Even more so, the standard library comes with very useful stuff (an ArrayList, a handful of different allocators, heck I replaced the trie of keywords with a StaticStringMap).

it’s a fun project, I would definitely recommend it!




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

Search: