this post was submitted on 13 Nov 2023
107 points (82.4% liked)

Programmer Humor

19551 readers
425 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

And I'll show you YAML

(a continuation of this post)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 39 points 1 year ago (15 children)

Serializing? For serializing you probably want performance above all else. I'm saying this without checking any benchmark, but I'm sure yaml is more expensive to parse than other formats where indentation don't have meaning.

For human readability: it has to be readable (and writeable) by all humans. I know (a lot of people) that dislike yaml, toml and XML. I don't know of a single person that struggles to read/write json, there is a clear winner.

[–] [email protected] 20 points 1 year ago (11 children)

JSON would be perfect if it allowed for comments. But it doesn't and that alone is enough for me to prefer YAML over JSON. Yes, JSON is understandable without any learning curve, but having a learning curve is not always bad. YAML provides a major benefit that is worth the learning curve and doesn't have the issues that XML has (which is that there is no way to understand an XML without also having the XSD for it)

[–] [email protected] 25 points 1 year ago (1 children)

Json should also allow for trailing commas. There's no reason for it not too. It's annoying having to maintain commas.

[–] [email protected] 4 points 1 year ago (1 children)

And also a standard date time type!

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

What is wrong with ISO 6801 strings?

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

11-2023-14

I dunno it just kinda looks weird to me

[–] [email protected] 2 points 1 year ago (1 children)

Dunno what format you've got there, but ISO 6801 looks like 2023-11-15T18:28:31Z

[–] [email protected] 3 points 1 year ago (1 children)

It's a joke, because the standard is 8601, not 6801.

[–] [email protected] 3 points 1 year ago

Oh. Egg on my face then lmao I didn't even notice

load more comments (9 replies)
load more comments (12 replies)