cue-lang / docs-and-content

A place to discuss, plan, and track documentation on cuelang.org
6 stars 1 forks source link

docs/howto/negate-a-disjunction #160

Closed jpluscplusm closed 4 months ago

jpluscplusm commented 5 months ago

(From https://github.com/cue-lang/cue/discussions/3229#discussioncomment-9770106)

A new Commented CUE howto guide that demonstrates the current method for complementing/negating a disjunction:

#foo: "1" | "2"

foo: "3"
_foo_ok: true & ((foo & #foo) == _|_)

(Flesh this example out a little - don't just include it verbatim)

Include a link to cue-lang/cue#943 and not() in the related content section, clearly marked as a probable future simplification - ie without a direct example (so that it can't be erroneously copied before the feature is available)

hansbogert commented 5 months ago

Which page would you suggest to add this to? @jpluscplusm @myitcv

jpluscplusm commented 5 months ago

Which page would you suggest to add this to?

@hansbogert I've updated the initial comment to make it clear that it's a new page.

The issue title generally tracks the current path suggestion, but it isn't binding - the experience of writing a page often informs us about the most suitable title as we're doing it. We're not precious about rigidly sticking to the issue's suggestion!

jpluscplusm commented 4 months ago

Closed via https://github.com/cue-lang/cuelang.org/commit/0e8f9ab8267a9ae897cb115f2fba3536eed45f3a