lua-users home
lua-l archive

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


Yeah, it's not that Underscore is the best functional library ever.  But it is pretty good, and it is small.

I think normally I would do something like "map(theFunction, theList)" whereas Underscore has "map(theList, theFunction)".  What's cool about that, in Lua, is if your your list (table) is an object with "map" to be found somewhere in it's metatable's index, you can do "myObject:map(theFunction)"

I ninja installed Underscore.js on a web project at work.  No one cares because it's about 10 to 20 times smaller than jQuery (depending on what all jQuery libs you need).  And Underscore.js (min) is 100 times smaller than Ext.js (min).

Unfortunately, it doesn't look like the Lua version is nearly as well-maintained as the _javascript_ version.