Not really a Dhall-specific question, but it’s come up in designing configs a fair amount and I’m curious about other people’s takes. Supposing for example you may or may not have say variants of a thing, do you prefer:
let Widget = { variants : List Text, .. }
or
let Widget = { variants : Optional (NonEmpty Text), .. }
(where NonEmpty a
is something like { head : a, tail : List a }
, obviously).
The latter strikes me as being perhaps more explicit about the absence of variants but is less ergonomic to work with.