lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>> I appreciate adding this "use x do ... end" might cause just as many
>> problems as this scoping discussion is trying to solve.
>
>It's beginning to look like a sort of let x = foo in ... end construct,
>familiar to functional programmers.

We have this already:

	let x=a and y=b in ... end

can be written in Lua as
	do local x,y=a,b ... end

Note the parallel evaluation in x,y=a,b : Even if x and y appear in a and b,
they're not the local ones, they're from the enclosing scope.
--lhf