Subject: Re: [Jsonpath] Opsdir last call review of draft-ietf-jsonpath-base-16

From: "Joe Clarke (jclarke)" <[email-masked]>
Date: Thu, 3 Aug 2023 22:02:54 +0000

> On Aug 3, 2023, at 17:59, Carsten Bormann <[email-masked]> wrote:
> 
> On 3. Aug 2023, at 23:47, Tim Bray <[email-masked]> wrote:
>> 
>> I really do think that in RFCs, when there’s something that’s optional, it’s really better to say why it’s optional and what might motivate choosing one option or another. 
> 
> But they are not “optional".

Fair.  I was mainly referring to examples like your C return statement.

> 
> They aren’t there:
> 
>   filter-selector     = "?" S logical-expr
> 
> You can use other features of the language to put some there, if you really want to:
> 
>   logical-expr        = logical-or-expr
>   logical-or-expr     = logical-and-expr ...
>   logical-and-expr    = basic-expr ...
> 
>   basic-expr          = paren-expr / ...
> 
>   paren-expr          = [logical-not-op S] "(" S logical-expr S ")"
>                                           ; parenthesized expression
> 
> You could use ?!(!(foo)) as well, and I also wouldn’t say that !(!(…)) is “optional”.
> 
> (I wouldn’t mind adding a note explaining why the parentheses are in the examples where they are.
> But I don’t know why we put them there.)

That works for me.

Joe

> Grüße, Carsten