CUE field types: what's available & what's missing #2709
Replies: 2 comments 3 replies
-
In https://cuelang.slack.com/archives/CLT4FD7KP/p1694086198707659 I proposed:
The use case for this new type was for it to act as a non-recursively-closed, cross-package "function parameter" type. This would extend the table in the discussion's opening post as follows:
A nuance which I don't /think/ is completely captured in this table is the effect of combining the new type with a definition. I.e. is
In other words, does the new type "block" (for want of a better word) recursive closedness implied by its container? I think that the answer needs to be "yes, it stops any 'inherited' closedness, but without recursively opening the fields it contains". If this wasn't the case, then the new type wouldn't be usable as a cross-package function parameter type where the function itself was declared as a definition. Or, rather, the new type would be indistinguishable from a definition when used in this situation, and might as well not exist. |
Beta Was this translation helpful? Give feedback.
-
// this works #definition: { def1: #definition & { |
Beta Was this translation helpful? Give feedback.
-
Right now, CUE makes 3 types of field available. To quote the spec:
Here's a table mapping each of those types to some key characteristics:
#
)_
)_#
)cue export
Table markdown for copy/paste in replies
This discussion is here to ask:
And to help answer that:
Beta Was this translation helpful? Give feedback.
All reactions