Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Lua has lambdas. They too suffer from verbosity, of course, but they're there.

    function(x) return x; end


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)


That's what I meant and didn't communicate well. I'm wishing for short-form syntax of lambdas, to be clear.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: