Re:Cue, an open-source data validation language
by throwamon on Tuesday June 15, 2021 @02:33AM
(#27511999)
Can a useful comparison be made between Cue and Clojure.spec?
[ Parent
| on HN ]
Re:Cue, an open-source data validation language
by dgb23 on Tuesday June 15, 2021 @05:50AM
(#27513071)
Philosophically they seem very similar, but at a glance[0] it seems like clojure.spec is quite a bit more expressive. Also spec lives in your REPL session and in your source code, while Cue is meant to be used as a CLI, so there is a completely different approach.
Re:Cue, an open-source data validation language
by sdboyer on Tuesday June 15, 2021 @06:51AM
(#27513438)
CUE is currently centered around its CLI, but AIUI, that's not the long-term goal. i read in some CUE issue somewhere that the goal is shifting towards enabling frameworks rather than driving people to the CLI, though i don't have a link.
Our use of CUE in Grafana is an example of framework-style usage. It is a hard requirement that users never have to install the CUE CLI to perform any of our planned CUE-related tasks; rather, the needed tooling is baked into Go packages we export, and things like grafana-cli. (Avoiding a dependency on the CUE CLI also gives us a defense mechanism against breaking changes)