1. The readme doesn't make it clear what its "float" type is. A double, a decimal, implementation defined. I'm generally not a fan of restricting numbers to what a double can represent, like toml does.
2. It doesn't have a good way to model key-value pair like types such as tagged unions, polymorphic types, or function invocations. Simply allowing a key-value pair as a value (right associative) where the key is a string matching the keys of an object would fix this. Alternatively a function call syntax would fix this, which would also enable tuples as a concept distinct from arrays.
jll29 [3 hidden]5 mins ago
Looks like Windows *.ini format except ":" instead of "="...
CodesInChaos [3 hidden]5 mins ago
Not really. INI has a fixed structure (section>key>value) and its values are untyped.
drvd [3 hidden]5 mins ago
So a stripped down variant of cue? Why not use cue directly?
brianm [3 hidden]5 mins ago
Cue only really exists in go, and has a dependency chain to make maven weep.
I think cue is better thought of as a language you use to generate JSON (or yaml, or, let's be honest, k8s flavored yaml) configs rather than a config language you use in your app.
esafak [3 hidden]5 mins ago
Can you add README sections for the schema and supported types?
1. The readme doesn't make it clear what its "float" type is. A double, a decimal, implementation defined. I'm generally not a fan of restricting numbers to what a double can represent, like toml does.
2. It doesn't have a good way to model key-value pair like types such as tagged unions, polymorphic types, or function invocations. Simply allowing a key-value pair as a value (right associative) where the key is a string matching the keys of an object would fix this. Alternatively a function call syntax would fix this, which would also enable tuples as a concept distinct from arrays.
I think cue is better thought of as a language you use to generate JSON (or yaml, or, let's be honest, k8s flavored yaml) configs rather than a config language you use in your app.
1: https://huml.io/
I'm curious for example configs that are top-level lists?