top | item 45504856 (no title) groovy2shoes | 4 months ago Lua has lambdas. They too suffer from verbosity, of course, but they're there. function(x) return x; end discuss order hn newest strenholme|4 months ago There 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/l...And for Lua 5.1: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) jrop|4 months ago That's what I meant and didn't communicate well. I'm wishing for short-form syntax of lambdas, to be clear.
strenholme|4 months ago There 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/l...And for Lua 5.1: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)
jrop|4 months ago That's what I meant and didn't communicate well. I'm wishing for short-form syntax of lambdas, to be clear.
strenholme|4 months ago
And for Lua 5.1:
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)
jrop|4 months ago