• thebestaquaman@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 day ago

    .vscode would like a word.

    But besides that, I just can’t understand why even someone that hates JSON would choose TOML over YAML for a config file.

    • Faux@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      21 hours ago

      Most of production failures in my company in last few years come from people making mistakes in yaml indentation.

      • thebestaquaman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        To me, that makes it sound like you’re writing too much and too complex yaml files manually, and/or that you don’t have good enough CI to catch invalid configurations. Unless, of course, you have very few prod failures overall, and the few that happen are due to yaml indentation, which I still think is a bit weird, since an invalid config caused by incorrect indentation should ideally be caught at compile time (if you’re generating code from the yaml) or by some linter or something (if you’re using it for config).

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours ago

      VSCode is Electron, i.e. a webpage, so it’s not hugely surprising that they opted for the natively supported JavaScript Object Notation. And also shows that they don’t care for using the right tool for the job to begin with.

      Personally, I much prefer TOML over YAML, because it does not have significant whitespace, and because you can read the spec in a reasonable amount of time. It just has so much less complexity, while still covering the vast majority of use-cases perfectly well.

      • thebestaquaman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        I’ll agree that significant whitespace can be a PITA (one of the reasons I prefer json over yaml), but at the same time I think improper or lacking indentation hurts readability even more than significant whitespace. Toml basically encourages a completely flat structure, where objects and sub-objects are defined all over the place. At that point, I much prefer an enforced structure with whitespace.