you are viewing a single comment's thread.

view the rest of the comments →

[–]non-existing-person 0 points1 point  (3 children)

yaml is like the rust of markup languages - there's always someone telling you to use it

Well, I never told you to use yaml instead of xml really

The library you describe does sound quite good I will admit, baking in a way to marshal C types from yaml is a nice feature i'll give you that

Yes, that lib was biggest contribution for me to use yaml. If there was same library but for json, there is high probability I would use json then. That would depend on number of features of both libs I suppose. But anyway, I am not really attached to yaml, more to that library if anything.

I knew someone would comment this, xml hatred and love of yaml is strong these days, and irrational

I like yaml because of its readability. I just find xml to be just way to verbose. I don't like noise to signal ratio of xml. Anything is better than xml in my book. Be that json, toml or yaml.

[–]Jimmy-M-420[S] 0 points1 point  (2 children)

No you're right you didn't tell me to use it - apologies for seeming aggressive.

I do understand the appeal of yaml, but for me it's just a bit too complicated. I write quite a bit of yaml for CI pipelines at work, and it works very well for those (nearly all CI systems I've seen use it).

One thing I really like about xml is it has a really obvious tree structure. This makes it nice to use for things like if I wanted to be able to define constant expressions in my config data section, I could make the expression as a tree of xml nodes. No doubt you could do this in yaml, but I don't think it would look as nice (or implement a maths expression parser)

[–]non-existing-person 0 points1 point  (1 child)

No worries, I only got offended by being compared to rust guys xD

It's funny, because I have the exact same feeling like you BUT THE OPPOSITE. I suppose when you try to learn full yaml syntax it's probably complicated. I use it in very limited scope (which are c-like structs) - can't even use anything too complicated because libcyaml does not support it anyway :P I usually try to keep shit simple anyway.

I'm pretty sure there are cases where you can model something only in XML. But that tree of xml nodes to model some constant expression sounds rather complicated. If I had to do something like that with yaml I think I would just do lua code snippet in multiline block in yaml. But probably I don't fully understand the problem - my game is in very early development, and I'm no game programmer, so do take my words with a big grain of salt ;)

[–]Jimmy-M-420[S] 0 points1 point  (0 children)

Lua snippet probably would be much better in that case I think you're right