News for hackers. Stuff that matters.
Re:XML is almost always misused by novok on Tuesday October 29, 2019 @05:29PM (#21392267)
YAML and TOML were optimized for human reading and writing, like markdown. XML & even JSON are not as human optimized, but still human usable.
Re:XML is almost always misused by sedachv on Tuesday October 29, 2019 @05:35PM (#21392326)
> YAML and TOML were optimized for human reading and writing, like markdown.

That was the rationalization, in reality I don't know what actual writing use case they were optimized for (Notepad?). XML in a syntax-aware editor with the help of automatic schema validation makes it far easier to write than YAML or TOML.

Re:XML is almost always misused by novok on Tuesday October 29, 2019 @06:10PM (#21392641)
I don't need a special editor to write out YAML (if it didn't have tab dependence) or TOML quickly. It's also a lot faster for a human to read vs XML. JSON is fairly readable, but a bit of a pain to write out compared to ini files, since you have to quote all strings.

If your going into complicated things like schemas or other complicated structures, then you probably shouldn't be using YAML or TOML. I would mostly use it for config or other simple things.

At this point if you are not interacting with 20 year old java software, that was created when JSON didn't exist and XML was king, you should be using TOML for simple config, JSON for most things and heavyweight XML, protobuf or csv for the specialized cases. And while we are at it, markdown for simple documentation.

Even gradle decided to use groovy scripts as their config language because it's far more human readable and usable.

Re:XML is almost always misused by sedachv on Tuesday October 29, 2019 @09:07PM (#21393713)
> At this point if you are not interacting with 20 year old java software, that was created when JSON didn't exist and XML was king, you should be using TOML for simple config, JSON for most things and heavyweight XML, protobuf or csv for the specialized cases.

You should be using S-expressions.

Re:XML is almost always misused by gambler on Tuesday October 29, 2019 @05:37PM (#21392350)
Humans should not interact with computers by manually editing data structures serialized to ASCII.
Re:XML is almost always misused by vinceguidry on Tuesday October 29, 2019 @05:42PM (#21392397)
The alternatives are usually worse.
Re:XML is almost always misused by unilynx on Tuesday October 29, 2019 @05:43PM (#21392398)
But we can't always budget a nice configuration application.

And once we've just put simple XML file there for configuration and we're past the prototyping phase... "well this actually works good enough, let it be".

Re:XML is almost always misused by Const-me on Tuesday October 29, 2019 @06:55PM (#21392970)
You likely need data model classes for the config anyway, along with support of serialization and deserialization (XML or not is not important). Use a stock property grid control, pass the root object of the config, and you’ll get a GUI that does the job much better than ASCII files.