Guidance may have been the wrong word as you’re not writing a style guide but a language spec. What I was missing in the read was something that said, “these two expressions are equivalent:
?@.price < 10
And
?(@.price < 10)
That is, the parentheses are optional.”
I was mainly curious to know when parens were required and when they were optional.
Joe
From: Tim Bray <tbray@xxxxxxxxxxxxxx>
Date: Thursday, August 3, 2023 at 17:47
To: Carsten Bormann <cabo@xxxxxxx>
Cc: Glyn Normington <glyn.normington.work@xxxxxxxxx>, ops-dir@xxxxxxxx <ops-dir@xxxxxxxx>, draft-ietf-jsonpath-base.all@xxxxxxxx <draft-ietf-jsonpath-base.all@xxxxxxxx>, jsonpath@xxxxxxxx <jsonpath@xxxxxxxx>, last-call@xxxxxxxx <last-call@xxxxxxxx>,
Joe Clarke (jclarke) <jclarke@xxxxxxxxx>
Subject: Re: [Jsonpath] Opsdir last call review of draft-ietf-jsonpath-base-16
On Aug 3, 2023 at 2:43:55 PM, Carsten Bormann <cabo@xxxxxxx> wrote:
I can think of two reasons why you would put them:
(1) If you want to write a query that works with JSONPath-base as well as an existing implementation that does require the parentheses.
(2) If you believe the parentheses increase readability (in general for a specific query, or possibly just to people that are used to the parentheses).
But I wouldn’t try to give guidance here for the same reasons I wouldn’t try to give guidance for return in C.
Um, I think you just did?
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.
|
--
last-call mailing list
last-call@xxxxxxxx
https://www.ietf.org/mailman/listinfo/last-call