From https://github.com/dhall-lang/dhall-kubernetes/issues/83
When I try to run yaml-to-dhall {x : Text, y : List Text} on this yaml:
x: "some text"
It of course complains that y is missing. Correct type for this would be {x : Text, y : Optional (List Text)}, but this can become too noisy even if a few a lists are optional. This is true especially in proejcts like dhall-kubernetes where (almost?) all the lists are optional. The same applies to maps.
It would be nice to if yaml-to-dhall had a flag to tolerate missing lists and maps and assume empty values. It would also be the opposite of --omitEmpty of dhall-to-yaml and would allow such YAML files to re-interpreted as Dhall.
What would be a good name for this option? --allow-empty?
One minor suggestion: see if there is an option name we can use for both directions for consistency (e.g. --omittable-lists or something like that)
I am not super fussed about it, but I found out that 'omissible' is probably more accepted word than 'omittable'.
One well respected dictionary has 'omittable' compared to 19 for 'omissible'. So maybe the flag should be called --omissible-lists?
About consistency though, dhall-to-* binaries have CamelCase names but *-to-dhall binaries have train-case, it would be really nice if they that was not the case.
Most helpful comment
I am not super fussed about it, but I found out that 'omissible' is probably more accepted word than 'omittable'.
One well respected dictionary has 'omittable' compared to 19 for 'omissible'. So maybe the flag should be called
--omissible-lists?About consistency though,
dhall-to-*binaries have CamelCase names but*-to-dhallbinaries have train-case, it would be really nice if they that was not the case.