62
Why YAML sucks? (programming.dev)
submitted 2 months ago* (last edited 2 months ago) by heikkiket@programming.dev to c/programming@programming.dev

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?

you are viewing a single comment's thread
view the rest of the comments
[-] NostraDavid@programming.dev 2 points 2 months ago* (last edited 2 months ago)

People are working on making S-Expressions a standard: https://datatracker.ietf.org/doc/draft-rivest-sexp/

Note: This is just a draft, but improvements have been happening since 2023.

I probably won't like the parentheses, but I think I'll take it over yaml/json/whateverelse.

[-] FizzyOrange@programming.dev 7 points 2 months ago

That appears to not support comments. How they made that mistake after JSON is a mystery.

[-] palordrolap@fedia.io 1 points 2 months ago

That's a thorny question: Do comments need to be in the base standard, or can that be offloaded to those building on it? It doesn't look like it would be hard to have (comment "foo bar baz") in an expression and have a re-parser throw that out.

Is the complaint that no two groups of people will use the same comment standard if left to their own devices? It's not like the other data from different sources will always match up. What's one extra, and fairly easy to handle SNAFU?

That said, yes, I think I'd be more comfortable knowing there was an accepted comment format. The aesthetic seems to be Lisp-like, and I notice that the Lisp comment marker, the semicolon, is currently a reserved character, that is, it's illegal to use it unquoted. Maybe they're thinking of adding that at some point.

[-] FizzyOrange@programming.dev 2 points 2 months ago

It doesn’t look like it would be hard to have (comment "foo bar baz") in an expression

That is pretty much what the official "solution" is for comments in package.json - add "//": "foo bar baz" keys to dictionaries and NPM will ignore them.

In practice it's terrible. You need real comments.

this post was submitted on 06 Sep 2024
62 points (73.8% liked)

Programming

17314 readers
68 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS