strictyaml icon indicating copy to clipboard operation
strictyaml copied to clipboard

Argument: Why not... Extended list

Open DonaldTsang opened this issue 5 years ago • 3 comments

  • https://github.com/dhall-lang/dhall-lang
  • https://github.com/hashicorp/hcl
  • https://github.com/archipaorg/icl
  • https://github.com/mrkkrp/liaison
  • https://github.com/ron-rs/ron
  • https://github.com/svenvc/ston
  • https://github.com/Sygmei/Vili

DonaldTsang avatar Nov 30 '19 13:11 DonaldTsang

Dhall, HCL, ICL, RON and STON all look like JSON (ugly brace syntax) but with extra features. Liaison is not much different. This misses the point of JSON, which is to be a minimalist format that is easy to parse.

Vili looks like YAML but with extra features. YAML's biggest problem is that it has too many features, so adding more is not a good idea.

StrictYAML combines the beauty of YAML with the simplicity of JSON, so you get the best of both worlds.

shoogle avatar Jun 21 '20 19:06 shoogle

Of course many of the features in these languages are useful, but it's not necessary to create a whole new format just to add features. Instead, the features could have been added as an optional layer on top of an existing format.

For example, if you want to add an "import" statement to StrictYAML, do it like this:

imports:
  - foo.yaml
  - bar.yaml

Your special parser would replace the import with the contents of those files, but the example would still be readably by ordinary StrictYAML parsers - they would simply return the code as written above.

Or inheritance:

dog:
  legs: 4
  tail: true
poodle:
  inherits: dog
  fur: curly

Perhaps StrictYAML should have a Wiki page to keep track of popular extensions to the format?

shoogle avatar Jun 21 '20 19:06 shoogle

Yes, it would be good for StrictYAML to have a Wiki page to keep track of extensions and comparisons, as a way of surveying features.

DonaldTsang avatar Jul 14 '20 05:07 DonaldTsang