• 1 Post
  • 253 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle








  • That’s a valid point.

    There are two kinds of good serialization languages, the ones where values are black boxes and only serialize the data structure, and the ones where everything is completely determined and can be turned directly into an API.

    JSON is neither, but it’s closer to the first than YAML. XML is the first, while the SOAP standard almost turns it into the second. TOML is about as close to the first as JSON.




  • marcos@lemmy.worldtoProgramming@programming.devWhy YAML sucks?
    link
    fedilink
    arrow-up
    9
    arrow-down
    3
    ·
    edit-2
    10 days ago

    Haskell supports both semantic whitespace and explicit delimiters, and somehow almost everybody that uses the language disagrees with you.

    But anyway, for all the problems of YAML, this one isn’t even relevant enough to point out. Even if you agree it’s a problem. (And I agree that the YAML semantic whitespace is horrible.) If YAML was a much better language, it would be worth arguing whether semantic whitespace breaks it or not.










  • Odds are that your computer doesn’t export any language where it will do exactly as you say (amd64 machine code certainly won’t execute exactly as written). And how much difference it makes varies from one language to another.

    But the specific example from the OP, of uninitialized variables, is one of those cases where the C spec famously goes completely out of line and says your code can do whatever, run with a random value, fail, initialize it, format your hard drive, make a transaction on your bank account… whatever.