function f()
x = 0
if false x=1 end
g = let x=x
() -> x
end
end
This form is suggested in the manual, and indeed the @code_warntype shows no warning.
My question is about the syntax x=x. Sometimes I want to captures several variables, and get let foo=foo, bar=bar, .... It seems stupid to repeat the same words, and indeed it reduces the readability when the variables’ names are long.
I’m wondering if it’s possible to have syntax like let ;foo, bar, as in the function call with keywords we can do fn(; foo, bar).