this post was submitted on 01 Feb 2024
44 points (87.9% liked)

Programming

16769 readers
103 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
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 6 months ago (4 children)

Why would one pick toml over yaml?

[–] [email protected] 9 points 6 months ago* (last edited 6 months ago) (2 children)

Xkcd 927?

Also yaml is ugly as hell and I'm okay avoiding it.

[–] [email protected] 6 points 6 months ago* (last edited 6 months ago) (1 children)

What?

It's simple and readable. You literally put somebody that has never coded in their life, show them the YAML file and they will probably get it. Worked both with my boss and my girlfriend.

In Toml there are too many ways to do the same thing, which I don't like. Also unless you know it deeply, you have no idea how the underlying data structure is going to look.

[–] [email protected] 17 points 6 months ago (1 children)

In Toml there are too many ways to do the same thing, which I don’t like

ha

63 different ways to write multi-line strings in YAML

[–] [email protected] 6 points 6 months ago (3 children)

Wow. I've never used yaml or even looked at it but damn that is horrid. Why do people even use this? JSON and XML are so better.

[–] [email protected] 11 points 6 months ago

I say this with all due respect, but XML can gargle nuts.

[–] [email protected] 8 points 6 months ago

Because no one ever uses those. Literally > and | are the only ones I’ve ever seen in over a decade and you will never need to worry about the differences between the two.

XML as a configuration language is terrible. Yaml gets the point across in an easily readable way, which is exactly the point. Same for JSON except JSON you can’t even use comments (you need json5 or one of the numerous other alternatives to get those).

[–] [email protected] 2 points 6 months ago* (last edited 6 months ago)

It's really unfortunate the devops world chose such a hot mess of a format. Extending JSON with comments would be a dumb choice and still do a better job for most config files.

noyaml.com

[–] [email protected] 5 points 6 months ago

Yaml is already pretty popular, so I don't think 927 applies here. It's actually more common in newer projects than toml.

Which begs the question, should I go with the flow or is there good reason to go with toml?

[–] [email protected] 7 points 6 months ago

Perhaps they're Norwegian.

[–] [email protected] 4 points 6 months ago

Significant whitespace is the devil's play thing.

[–] [email protected] 3 points 6 months ago* (last edited 6 months ago)

XML < YAML < TOML < possibly others

noyaml.com