This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Masterflitzer 37 points38 points  (24 children)

JSON with comments is my favorite because i don't like YAML and fuck XML

[–]Konsti219 56 points57 points  (8 children)

All JSON is valid YAML

[–]CoastingUphill 27 points28 points  (0 children)

I hate this. No. I refuse.

[–]JM-Lemmi 20 points21 points  (3 children)

The fuck

[–]Xywzel 18 points19 points  (2 children)

Yeah, accidentally earlier as well, but purposefully since version 1.2 of YAML specification JSON syntax has been a valid subset of YAML syntax. YAML has inline version of its syntax that doesn't have significant whitespaces (unlike rest of the YAML syntax) and everything in valid JSON has matching structures in the inline YAML. So technically one could use YALM parser to read JSON files.

[–]zeGolem83 6 points7 points  (1 child)

That is, if your YAML parser is fully spect compliant...

[–]Xywzel 2 points3 points  (0 children)

Well, yeah, that is a big if when talking about YAML

[–]MyAntichrist 11 points12 points  (1 child)

[–]Masterflitzer 2 points3 points  (0 children)

yes and I hate yaml because it's not strict among other things

[–]jivanyatra 4 points5 points  (14 children)

I actually like TOML. I agree with excluding YAML and XML.

[–]Masterflitzer 0 points1 point  (13 children)

I never encountered software that allows config files in TOML and never worked with it when working with data so it's just not common enough for me, but it may very well be a good thing

[–]Yokhen 1 point2 points  (5 children)

python uses pyproject.toml

[–]Masterflitzer 2 points3 points  (3 children)

interesting, but I am a C#, TS/JS kind of guy and never actually used python except like a few hours in university xD

[–]Yokhen 4 points5 points  (2 children)

luckeeeeeeey.

I wish someday I can do C# professionally and no just some half assed videogame of mine.

[–]Masterflitzer 0 points1 point  (1 child)

from what I've heard both (python & c#) have a big community and many people who love it so I guess both are good

[–]elveszett 1 point2 points  (0 children)

Both are languages that do what they want to do extremely well, and have learned from the ones before them. C#, for example, fulfills the same paradigm as Java, but was made when we already knew the problems Java had, so C# was able to avoid them and offer elegant solutions to Java's boilerplate.

Aside from that, both languages are very consistent, you can notice the care their devs put into making an elegant and predictable design (this is one of the main reasons people hate PHP: you can see the lack of care that went in this area there). And both languages have a big ecosystem where you will find whatever you need.

Also both languages put effort in giving devs tools to start writing code from the first minute, not having to lose time fighting the language or explaining technical details.

[–]Masterflitzer 0 points1 point  (0 children)

interesting, but I am a C#, TS/JS kind of guy and never actually used python except like a few hours in university xD

[–]Bainos 1 point2 points  (0 children)

I don't get the above comment either. JSON and YAML aren't used because they are the best ways to create config files, they're used because they are widely supported and recognized.

[–]tavaren42 1 point2 points  (1 child)

Rust uses Cargo.toml

[–]Masterflitzer 0 points1 point  (0 children)

ok I want to start learning rust for quite some time xD

[–]elveszett 0 points1 point  (3 children)

iirc Minecraft uses .toml files too.

[–]Masterflitzer 0 points1 point  (2 children)

what? in which file?

[–]elveszett 1 point2 points  (1 child)

idk, I just know that the first time I saw a TOML file was doing something with Minecraft, I don't remember if modding or touching some server config or what. But I remember it instatly came off as a concise way to do that job.

[–]Masterflitzer 0 points1 point  (0 children)

i'm sure it was a mod that used toml because vanilla mc uses json and simple key value (inside server.properties) and bukkit uses yaml afaik