1. 26
  1. 2

    I do that here and there. When I was more into Lua, I wrote some functions for functional programming, stuff like map() and friends. Around that time I was also messing around with functions with variable numbers of arguments, it turns out there is quite a bit you can do there in Lua as well. So I’d make things like a map() function that could take another function, and a variable number of tables (lists). So you didn’t need a map2(), map3() and such. I thought it was really neat.

    Then that got me thinking about why Lua even needs to be passing arguments into or out of functions. Why not just use tables? Then that got me into programming language design (again). What if you had a minimal Lua that was built around tables, like Lisp / Scheme is built around linked lists? Where all the code is stored in tables as well, and make meta-programming and/or macros more integrated into the language?

    That’s me though, I’m always getting off on tangents.

    Edit: more on map()

    1. 2

      What if those tables are just based on content addressing a lisp where all atoms are quoted bytestrings. What if you could build theorems about the relations between the data and ways to interpret it….