3 ms·
YAML was always intended to be written by hand. It was originally an alternative to XML for "markup language" although it isn't one. It was used for serializati
by ianburrell 3y ago
YAML was always intended to be written by hand. It was originally an alternative to XML for "markup language" although it isn't one. It was used for serialization, but JSON quickly won in that realm. But YAML was used for configuration files from the start. A good example is the quoting of strings, that wouldn't be optional in serialization language.
- throwawaaarrgh 3y ago> YAML was always intended to be written by hand. No, it was intended to be an alternative to XML. But it was the renamed to YAML Ain't a Markup Language, because it's really intended to be used for data, not human-centric markup. YAML uses hard data typing, and types are inferred (though can be explicit). When a program serializes data, it does not add the explicit types. Therefore for a human to edit the file, they would need to have the entire YAML parser semantics in their brain, or add the explicit types, and hope the YAML parser they are using will re-serialize the explicit types (most are poorly implemented and won't). Therefore it is virtually impossible for a human to write YAML correctly by hand. Its only reliable use is as a data language for programs to serialize data. It just happens to be easy to read.