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

Programming

17483 readers
191 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 [email protected]



founded 1 year ago
MODERATORS
62
Why YAML sucks? (self.programming)
submitted 2 months ago* (last edited 2 months ago) by heikkiket to c/programming
 

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
[–] [email protected] 26 points 2 months ago (3 children)

I don’t like YAML because it’s overly complicated. The specification is like 80 pages long. How the hell did they think that was a good idea?

JSON on the other hand is super simple. It doesn’t do more than it needs to.

Just compare this: https://yaml.org/spec/1.2.2/

With this: https://www.json.org/json-en.html

The entire JSON specification is shorter than just the table of contents of the YAML specification!

Another thing I like about JSON is that you can format it however you want with the whitespace. Want everything on one line? Just write everything on one line!

If data can be represented as a JSON, then there’s generally only one way to represent it in JSON (apart from whitespace). In YAML the same data can be represented in 1000s of different ways. You pick one.

[–] verstra 13 points 2 months ago

This is the major reason for me. I really liked yaml, because it is way more readable to me than JSON. But then I kept finding new and more confusing yaml features and have realized how over-engineered it is.

Yaml would be great language if it had its features prunned heavy.

load more comments (2 replies)