[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as a configuration language -- validation
- From: Scott Morgan <blumf@...>
- Date: Thu, 22 Aug 2019 14:43:01 +0100
On 22/08/2019 13:25, Chris Smith wrote:
> I’m using Lua for configuration. That means I need to validate
> entries for correctness, provide default values and warning messages
> where necessary, as well as ensuring my code doesn’t blow up when
> trying to access a non-existent structure. I’m finding my code
> becoming bloated with largely boiler-plate safety code, particularly
> when accessing entries that are nested a few levels deep.
>
> Is there a nice, idiomatic way of handling this?
Would this help?
http://lua-users.org/lists/lua-l/2015-07/msg00138.html
Whole thread might be of interest:
http://lua-users.org/lists/lua-l/2015-07/msg00119.html
Scott