[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua as a configuration language -- validation
- From: Chris Smith <space.dandy@...>
- Date: Thu, 22 Aug 2019 13:25:44 +0100
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?
Regards,
Chris
—
Chris Smith <space.dandy@icloud.com>