3 ms·
> I can't find anything to suggest Zig has lambdas. Closures are problematic in low-level languages, as their capture behaviour requires tricky syntax and/or i
by pron 5y ago
> I can't find anything to suggest Zig has lambdas.
Closures are problematic in low-level languages, as their capture behaviour requires tricky syntax and/or implicitness, and Zig is very much opposed to both. Non-capturing anonymous functions expressions will be added (https://github.com/ziglang/zig/issues/1717 https://github.com/ziglang/zig/issues/1717), while a limited form of closure is being considered (https://github.com/ziglang/zig/issues/6965 https://github.com/ziglang/zig/issues/6965).