lua-users home
lua-l archive

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


Quoth steve donovan <steve.j.donovan@gmail.com>, on 2010-11-23 18:22:20 +0200:
> String lambdas to the rescue!
[...]
> The irritating thing is that 'hero' would have to be a global or at
> least a field in the environment you use to compile the lambdas; they
> cannot be _closures_.

Which is dreadful, and even the parts that can be gotten right are
easy to get wrong and easy to break.  Passing code around as strings
like that is one of those constructions that moves invisible coin
blocks into your path when you're not looking.  It's more befitting of
Tcl or PHP than the clean (if dusty and cratered) surface of Lua.

(My local token filter uses « » and $1, $2, … for short expr funs and
their arguments, but I gather many people might not like the non-ASCII
bit.  << and >> are synonymous.)

> steve d.

   ---> Drake Wilson