core-wg / href

Other
2 stars 0 forks source link

Give names to sentinel values in the CDDL #10

Closed chrysn closed 2 years ago

chrysn commented 2 years ago

What "null" and "true" means in terms of authority has caused confusion (eg. in the test vectors).

This gives more explicit names to them by defining constants.

Defining the constants for scheme and discard too might be excessive; I can cut that back again.

(What this does make more complicated is understanding why all the alternatives are mutually exclusive, not sure we can do that w/o going for hungarian notation.)

chrysn commented 2 years ago

for keep-scheme the value is really absent, and nullability makes sense here. I can add it back if you prefer, but unlike the distinct null and true variations, I think that the null here is on the high level obvious enough, and on the detail and implementation level it has good explanations, also when it comes to stripping the leading nulls.

But yes I missed reverting the keep-scheme use (and then also upper-casing it).

cabo commented 2 years ago

Thanks!

chrysn commented 2 years ago

It's actually merged; github seems not to recognize merges any more if they're explicitly announced in the commit.