this post was submitted on 06 Sep 2024
1 points (100.0% liked)

Programming

23877 readers
291 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 2 years ago
MODERATORS
 

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?

top 8 comments
sorted by: hot top controversial new old
[โ€“] Vivendi@lemmy.zip 1 points 1 year ago* (last edited 1 year ago) (2 children)

Can people stop hating on shit?

FOR FUCKS SAKE, negative reinforcement dopamine has RUINED THE FUCKING NET.

EVERYWHERE I GO there's someone bitching about something, hate circlejerks are unbelievably popular, people just love to hate on stuff.

You're ruining your thought patterns with all these social media negativity bullshit.

Fucking TOML users hate on fucking YAML fucking C++ users hate Rust fucking Rust users hate literally everything under the sun and are insufferable to work with

EVERYONE, fucking CHILL

[โ€“] darki@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Can you stop hating on haters? Thanks ๐Ÿ˜„

[โ€“] sip@programming.dev 1 points 1 year ago

stop hating on rust devs

[โ€“] NostraDavid@programming.dev 0 points 1 year ago* (last edited 1 year ago) (1 children)

YAML is fine if you use a subset (don't use the advanced features - not like you know those anyway) and use explicit strings (always add " to strings), otherwise things may be cast when you did not intend values to be cast.

Example:

country: NO (Norway) will be cast to country: False, because it'll cast no (regardless from casing) to false, and yes to true.

country: "NO" should not be cast.

[โ€“] NostraDavid@programming.dev 0 points 1 year ago* (last edited 1 year ago) (1 children)

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.

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

[โ€“] Windex007@lemmy.world 0 points 1 year ago (1 children)

Any language in which whitespace has syntactic value is intrinsically flawed.

Can't speak to your specific issues, but that's why yaml will always suck.

[โ€“] eager_eagle@lemmy.world 1 points 1 year ago* (last edited 1 year 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.