r/ProgrammerHumor • • Sep 13 '18

Meme Writing YAML

Post image
645 Upvotes

88 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Sep 13 '18

Wow that sounds really nice. Is it functionally better in any way?

2

u/Excolo_Veritas Sep 13 '18

Never looked into it as far as any kind of performance. My gut would say no better or worse, as its going to be just as fast as reading any string, and I doubt that a tab, space, or new line character is going to be any different than processing a { or [. It might be though for really long ones, like 200mb+ but at that point I'd argue there's no point to use YAML anyway. Again, these are purely gut instinct, with no analysis or research behind it

2

u/msg45f Sep 13 '18

The biggest functional benefit is the ability to write comments. JSON, being built simply to describe object state, doesn't have a particularly good way to embed comments. Some of the uses that JSON has been picked for, such as configuration, are really places that should support comments.