Erik Engheim
Nov 11, 2020

--

Lambdas, you can call them that then, which don't capture context may already be possible, and if not it will be possible in Zig v0.8. In Zig v0.8 they will move to a syntax where functions are always defined anonymous. To refer to them later you need to assign them to a constant.

This is to harmonize the syntax for how e.g. structs are defined in Zig, which is based on the same idea.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

No responses yet