A 10 minute read covering some YAML edge-cases that you should have in mind when writing complex YAML files

  • Thinker@lemmy.world
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    6 months ago

    YAML is truly an untenable format. I’m personally excited for KDL to stabilize and hopefully see wider adoption, but in the meantime I’m fine sticking with JSON most of the time.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      6 months ago

      That has XML semantics, which isn’t what people want in the vast majority of cases. They want JSON semantics because it matches programming language object models.

      XML semantics are good for documents.

    • moonpiedumplings@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      4
      ·
      edit-2
      6 months ago

      I don’t see anything about turing completeness or programmatic capabilities in their github. Any language that doesn’t have the programmatic abilities will inevitably get them hacked on when someone needs them, like what happened to yaml a bunch of times for a bunch of different software. This is one of people’s many frustrations with yaml, the fact that doing a loop, an if statement, or templating, is different for every single software that uses yaml. Even within Kubernetes, there exists different ways to do templates.

      I would much rather see the language consider those things first, then see it repeat one of the biggest mistakes of yaml. This is why I am more eager for things like nickel, or even Nix as a configuration language, and am skeptical of any new standard that doesn’t have those features.

      • Magiilaro@feddit.org
        link
        fedilink
        arrow-up
        3
        ·
        6 months ago

        Yaml is a data storage format, why should it have any kind of programmability or even turning completeness?

        Those things should be done in the program that uses the data not inside of the data itself.