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?

  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    5
    ·
    edit-2
    12 days ago

    YAML sucks because, among other things, indenting it is not obvious.

    In contrast, the only mistake of Python when it comes to whitespaces was allowing hard tabs, which makes it too easy to mix them if your editor is not configured.

    Improper indentation stands out more than missing or unbalanced braces and it’s really not an issue to delimit code blocks.

    • ugo@feddit.it
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      12 days ago

      Hard tabs are the only accessible option though. If you care about developers with a different vision capability than yours, the only correct indentation choice is tabs.

      If, because of bad vision, someone needs to crank the font size way up, it’s very possible that they might need to work with a tabstop of 3, 2, or even just 1 space.

      With tabs, this is user configurable. With spaces it isn’t.