Hacker News new | ask | show | jobs
by encryptluks2 1458 days ago
It seems to me that HSL is a better fit than TOML. I use TOML because it is okay and seems better suited than YAML in some situations, but if I had a choice HCL would be the defacto standard.
3 comments

HCL is also oodles more complex than TOML since it has expression evaluation, whereas TOML is just a static format. It really depends on your use case and I think there's a lot of cases where TOML makes a lot more sense than HCL (e.g. metadata formats).
HCL is one properly nested format and much more readable like YAML. TOML ends up getting confusing once you nest a few levels.
HCL also has expression evaluation however: TOML parsing is guaranteed linear over the size of the file, but HCL isn't necessarily because you can trivially do things like dynamically create a n*n-sized list from n-sized input list, which may be an undesirable property!
CUE is much better than HCL. I've been converting my more complex TF to CUE and then exporting as json for TF to consume.
Thanks. I'll check it out.
What's HCL?
Hashicorp (config?) Language

It's what your Terraform files are primarily written in