Re:Typed Config Languages
by TrainedMonkey on Friday January 21, 2022 @03:02PM
(#30029202)
Would most of the footguns be solved by quoting all of the strings? e.g:
[ Parent
| on HN ]
Yes, but now you are losing a lot of the clean syntax that causes most people to use YAML in the first place. There is a reason that most people don't write YAML like JSON with trailing commas and comments, it is nice to cut most of this noise.
You can also use a stricter subset of YAML that removes things like the "no" footgun. Plenty of such strict parsers exist across languages. Maybe it's no longer technically YAML at that point, but you get all the nice parts of YAML without having to revamp everything with static typing.