lua-users home
lua-l archive

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

I think you'll find nested tables easier to maintain.
You'll have one extra table for each substitution,
but I think that's a fair price for some added clarity

This is not only clearer than my approach, but also safer since the strings on which to match aren't duplicated in the code (so you can't accidentally get one of each pair wrong).