Comment Comment by bitwizeshift Why “perma goodbye”?Go has a similar function declaration, and it supports anonymous functions/lambdas.E.g. in go, an anonymous func like this could be defined asfoo := func(x int, _ int) int { … }So I’d imagine in Zig it should be feasible to do something likevar foo = fn(x: i32, i32) i32 { … }unless I’m missing something? parent bitwizeshift 1 year ago
Go has a similar function declaration, and it supports anonymous functions/lambdas.
E.g. in go, an anonymous func like this could be defined as
foo := func(x int, _ int) int { … }
So I’d imagine in Zig it should be feasible to do something like
var foo = fn(x: i32, i32) i32 { … }
unless I’m missing something?