3 ms·
> Whereas if you abuse YAML (or JSON or XML or whatever) to create a limited and hard/impossible-to-extend DSL, you still have much more control over what can a
by js8 6y ago
> Whereas if you abuse YAML (or JSON or XML or whatever) to create a limited and hard/impossible-to-extend DSL, you still have much more control over what can and cannot be executed by the config engine, even if the DSL happens to accidentally become Turing complete. You can embed limited shell commands in the DSL as an escape hatch, but make it difficult enough that you really have to try to make a mess.
The article actually mentions Dhall as a solution. This engineering problem has been resolved.
- agbell 6y agoAuthor Here. Yeah, I am really excited about Dhall. I think this is the future, it supports the types of abstractions that we need without the mess of full templating or full turing completeness. The one downside to Dhall is you really want to have an implementation for it in each common language. You can use it to generate YAML, but I think it would be better if tools understood Dhall and that is a bigger ask because it is a more complicated implementation. Let's build Dhall implementations for every major language, convince Gabe to format things in a way that makes it look more familiar to non-haskell people and consider this problem solved.
- haskellandchill 6y ago> Let's build Dhall implementations for every major language That sounds like fun, is there any effort underway for this? I'd be down to contribute.
- agbell 6y agoThere are for some languages. https://github.com/dhall-lang https://github.com/dhall-lang
- alephu5 6y agoI love Dhall and really don't understand why the industry hasn't standardised on it yet, seems like a no brainer. I disagree with your point that it should supported by each language however, I think it's much better to use something simple like JSON as a "compilation" target since it's easy for machines to read and lets users pick the configuration backend. Use a smart language like Dhall or bazel for managing configuration and use a mundane format like JSON for the machine, let the Dhall binary bridge the gap.