4 ms·
I disagree. TOML is terrible at handling nested data. Check this thread: https://news.ycombinator.com/item?id=17523194 https://news.ycombinator.com/item?id=17
by benatkin 5y ago
I disagree. TOML is terrible at handling nested data.
Check this thread:
https://news.ycombinator.com/item?id=17523194 https://news.ycombinator.com/item?id=17523194
I don't see Kubernetes switching to TOML anytime soon!
- mountainriver 5y agoAlso agree, I find toml way less readable than yaml for lots of data structures
- Aeolun 5y agoThere may be no nested data in his use case. There’s no single correct answer here.
- benatkin 5y agoToo YAGNI for me.
- avsteele 5y agoI have nesting up to three levels deep. I use inline tables^ for the many innermost (or other few-element) tables. It's never seemed excessively verbose. ^https://toml.io/en/v1.0.0#inline-table https://toml.io/en/v1.0.0#inline-table
- benatkin 5y agoA bit later you see [fruits.physical] Even XML doesn't make you repeat the higher level keys!
- encryptluks2 5y agoI think the "right" choice is HCL
- deleted 5y ago[deleted]
- benatkin 5y agoIt's plenty easy to convert YAML to JSON and use it in Terraform :) https://www.terraform.io/docs/language/syntax/json.html https://www.terraform.io/docs/language/syntax/json.html
- encryptluks2 5y agoWhy convert when HCL is superior to YAML and JSON?
- benatkin 5y agoIt isn't. YAML and JSON are much more proven than HCL. HCL is used for some relatively small products. Just making something more complicated doesn't make it better.
- encryptluks2 5y agoProven in what sense? Several implementations are broken are incorrect. HCL is used in very large products as well. Just because it isn't the majority currently doesn't mean that it isn't a worthy choice. HCL isn't more complicated if used as an alternative to YAML or JSON, in fact, I would argue that it is simpler. It bridges the pros of YAML and JSON combined, and addresses the nested complexity of TOML. It really is IMO the best, but you of course are free to share a different opinion. However, I would encourage you to actually try it out and re-evaluate.
- duped 5y agoI feel like if you have data so nested that TOML is a problem then your schema is a problem/you should just be using a script