lobsters score: 1 · tags: lua, zig
I don’t know that much about Zig, but I think the parallels to Lua’s top-level to Zig’s comptime are not particularly strong. In Lua there is no difference between execution that happens inside a function vs execution that happens at the top-level, because the top-level is a chunk, which is a kind of function. If you could run Lua code at load time, then it would be analogous to comptime, but this is not what actually happens.
Good article other than that.
score 1 · canonical
I like that the author starts with
zig runand even writes the build file step-by-step. That’s a really gentle introduction, but necessary if the next part starts linking C libraries. I’m not entirely sure what audience needs that kind of slope but knows they want to embed lua, but if this continues this way I’m looking forward to the next parts.
score 1 · canonical
