Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison to CUE? #30

Open
0Grit opened this issue Sep 5, 2021 · 3 comments
Open

Comparison to CUE? #30

0Grit opened this issue Sep 5, 2021 · 3 comments

Comments

@0Grit
Copy link

0Grit commented Sep 5, 2021

Looks like the discussions feature is not turned on for this repository or I would use it instead of making an issue.

Trying to gather my bearings as I get back up to speed on modeling

I'm curious how those working on CDDL might compare CDDL to CUE.
https://cuelang.org/docs/usecases/datadef/

@mjkoster @beriberikix @vitprajzler @alvarowolfx

@beriberikix
Copy link

The CUE docs do a bit of a comparison:

The Concise Data Definition Language (CDDL) is used to define the structure of CBOR or JSON data. CDDL shares many of the same constructs from CUE, including disjunctions, embedding, optional fields, and definitions.

CDDL, however, has no value lattice and does not define mathematical properties of its data. There several other aspects in CDDL that contradict the use of a value lattice or make it harder to do so. Overall this restricts the expressiveness of CDDL compared to CUE while complicating the ability to combine constraints on types from multiple sources.

Unlike OpenAPI, CDDL is a domain-specific language (DSL). It needs a specific interpreter. It also has some non-trivial aspects to its evaluation, making it much harder than OpenAPI to implement.

@cabo
Copy link
Contributor

cabo commented Sep 6, 2021 via email

@beriberikix
Copy link

Thanks the detailed response, Carsten! Do you see any opportunities or advantages to use CUE & CDDL together? For example, CUE integrates with Protocol Buffer, so would integrating CDDL in a similar create value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants