[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua AST and Parsing a "C" Like language
- From: Axel Kittenberger <axkibe@...>
- Date: Tue, 23 Aug 2011 11:18:59 +0200
> lso, I wonder if it's wise to have loops in a _data description_ language?
> Most things should be done using the declarative style in this case.
This is a matter of taste. If you configuration is repetitive, why
not? The only downside I see is (and I guess the reason why some
people object), guessing the time to read a config becomes a np-hard
problem, but in practice just limit it with some cap to pcall and call
it broken, if it doesn't complete in n cycles. I for one explicitly
appreciated the possibility to do loops in the config when I switched
Lsyncd's configuration from XML to Lua.