lua-users home
lua-l archive

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


On Thu, Jul 4, 2019 at 3:43 PM Sergey Kovalev wrote:
Yes indeed. There is no pure function in lua. That's why they are quite rate.
upvalues are almost everywhere that's we are unable to isolate
different part of code.



Nested scopes (with ability to access variables/functions from outer scope but not from inner) is a useful feature.
Nested scopes was a strong argument in "Pascal vs. C" holywars, and I was very proud to be at Pascal side :-)

Lua programmers are using upvalues frequently because upvalues are powerful; that's why pure functions are rare in Lua.