4 ms·
Lua has lambdas. They too suffer from verbosity, of course, but they're there. function(x) return x; end
by groovy2shoes 1y ago
Lua has lambdas. They too suffer from verbosity, of course, but they're there.
function(x) return x; end
- jrop 1y agoThat's what I meant and didn't communicate well. I'm wishing for short-form syntax of lambdas, to be clear.
- strenholme 1y agoThere are patches for this so the above can be expressed with something like this: [ (x) | x ] http://lua-users.org/files/wiki_insecure/power_patches/5.4/lua-5.4.2_shorthand-lambdas.patch http://lua-users.org/files/wiki_insecure/power_patches/5.4/l... And for Lua 5.1: http://lua-users.org/files/wiki_insecure/power_patches/5.1/lua-5.1.4_shorthand-lambdas.patch http://lua-users.org/files/wiki_insecure/power_patches/5.1/l... (I personally don’t use patches like this because “Lua 5.1” is something pretty standardized with a bunch of different implementations; e.g. I wrote my Lua book with a C# developer who was using the moonsharp Lua implementation)