cbor-wg / cddl-more-control

Second extension pack of CDDL control operators after RFC 9165
Other
0 stars 1 forks source link

Self-contained examples #2

Closed mguetschow closed 8 months ago

mguetschow commented 8 months ago

I would propose to use self-contained examples, i.e., where all types/groups that are used are also defined (or part of the CDDL prelude).

In particular, the example in 2.1 uses COSE_Sign1, and the example in 2.4 uses issuer and expiry.

Possibly related to #1

cabo commented 8 months ago

I think there are competing objectives here:

  1. making an example understandable without context
  2. making an example motivate itself and the feature being demonstrated

Defining all rules might aid (1), or might be counterproductive as the example becomes more complicated. Reducing the amount of rules that need to be added might remove the motivation that is intrinsic to the existing examples.

On the two examples you cite, I see the balance clearly on the side of keeping the example self-motivating.

mguetschow commented 8 months ago

On the two examples you cite, I see the balance clearly on the side of keeping the example self-motivating.

For the first one, I agree. For the second one, I don't see a difference if both issuer and expiry would be replaced by, e.g., text.

cabo commented 8 months ago

OK, now 9e8c585. I think we are done with that issue?

mguetschow commented 8 months ago

Yes, thank you!