I feel that Yaml sucks. I understand the need for such markup language but I think it sucks. Somehow it’s clunky to use. Can you explain why?

  • LyD@lemmy.ca
    link
    fedilink
    arrow-up
    17
    ·
    2 months ago

    YAML works great for small config files, or situations where your configuration is fully declarative. Go look at the Kubernetes API with its resources.

    People think YAML sucks because everyone loves creating spaghetti config/templates with it.

    One reason it tends to become an absolute unholy mess is because people work around the declarative nature of those APIs by shoving imperative code into it. Think complicated Helm charts with little snippets of logic and code all over the place. It just isn’t really made for doing that.

    It also forces your brain to switch back and forth between the two different paradigms. It doesn’t just become hard to read, it becomes hard to reason about.