2 ms·
Cue is a little different I think. It doesn't attempt to make writing configs less tedious through the use of functions. It is more about schemas and reliably
by IshKebab 4y ago
Cue is a little different I think. It doesn't attempt to make writing configs less tedious through the use of functions.
It is more about schemas and reliably merging documents as far as I can tell. But weirdly given its focus on schemas I couldn't find any way for a document to link to a schema in-band!
- joshuamorton 4y agoIt makes writing configs less tedious using templates. Not really sure what you mean by "documents" though.
- evancordell 4y ago> But weirdly given its focus on schemas I couldn't find any way for a document to link to a schema in-band! In cue there's no real distinction between "schemas" and "documents". If you say: value: string value: "abc" then cue "unifies" the definitions for `value`, sees that "abc" is a string, and therefore `value` is valid.
- IshKebab 4y agoYes I know, but there's no in-band way to say "this file conforms to the schema in this other file" like you can with XML or JSON schemas. For Cue you would probably just want to #include a file... but as far as I know you can't do that. That makes it far less useful for IDEs, linters and so on. I don't think there's any reason they couldn't add that feature. Just a bit odd that they haven't already.