3 ms·
What do you mean by no lambdas exactly? Lua supports anonymous functions and they're in fact closures, since those functions capture variables from their outer
by Benjamin_Dobell 4y ago
What do you mean by no lambdas exactly? Lua supports anonymous functions and they're in fact closures, since those functions capture variables from their outer scope.
I use functional programming extensively in Lua also. Could you elaborate on what it doesn't permit?
Integers were introduced in 5.3.
Assigning operators? It has metatables, you can absolutely implement your own operators.
If you want static typing you can use my IDE: https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis/ https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis/
Granted, my IDE is incredibly opinionated and not for everyone.
Also, Lua is not my favourite language to use, doesn't even make top 3. However, the robustness of its design, considering its simplicity, is incredibly elegant.
- edflsafoiewq 4y ago> Assigning operators +=
- Benjamin_Dobell 4y agoAh, thanks for the clarification. It does indeed lack those. I tend to call those short-hand operators since I guess technically `=` is an assigning operator. Personally, I don't have a strong opinion on their omission, however I know some prefer the simplicity.
- lenkite 4y agoOoh, didn't know about Luanalysis, thanks for creating it! Going to check that out. I personally found functional programming non-ergonomic in Lua considering that anonymous functions are very verbose and there is no map/filter/etc in the standard language/library unlike just about every PL these days. You need to pull stuff in for basics and everyone does it slightly differently leading to non interoperability. Sorry, I meant shorthand assignment operators. Those are quite convenient.