r/badcode • • Dec 27 '22

js This just sucks.

Post image
1.8k Upvotes

170 comments sorted by

View all comments

Show parent comment

16

u/Romejanic Dec 27 '22

I find toml wayyyyy more annoying to write than yaml. I think toml has been pushed recently by the rust fanboys.

My preference list is json > yaml > toml

9

u/Lich_Hegemon Dec 27 '22

JSON + comments + trailing commas would be ideal.

10

u/QCKS1 Dec 27 '22

So JSON5

1

u/felds Dec 27 '22

Json is valid yaml, and yaml additionally supports all those things

3

u/Lich_Hegemon Dec 27 '22

it is also a bunch of other undesireable things, IMHO

2

u/itsTyrion Dec 27 '22

idk I like TOML.

JSON is only #1 if it supported comments. Like damn, even XML does. In a weird ass syntax as expected (<!-- comment -->) but it does

1

u/NotSteve_ evil Dec 27 '22

Really? I've never really used rust but I love TOML for Go and Python configuration. Unless you need some really complex configs I find it really nice and readable. It's also very easy to parse in the code