lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Dec 17, 2009 at 9:33 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> Another way of putting this: what are the functions you find yourself
> needing to rewrite for yourself?

Just to get the ball rolling, here are my two dozen:

http://lua-users.org/wiki/CoreFunctionsProposal

This uses a Pascal-like notation for indicating the argument types,
which I hope should be mostly obvious.

There is precisely one function (glob) which depends on an external
library (lfs) so perhaps this function should just convert a shell
file pattern into a Lua string pattern (there is existing code to do
this by David M)

It's a mixed bag, biased towards table operations.  You will notice
that there is both map and imap; strictly speaking, map should do the
job, but imap would use ipairs() and so would _not_ operate on any
hash-like part of the table.  Incidently, the dual nature of Lua
tables makes defining the basic map, filter etc primitives an
interesting challenge.

steve d.