ietf-wg-jsonpath / draft-ietf-jsonpath-base

Development of a JSONPath internet draft
https://ietf-wg-jsonpath.github.io/draft-ietf-jsonpath-base/
Other
58 stars 20 forks source link

Improve function extension language #457

Closed glyn closed 1 year ago

glyn commented 1 year ago

Use parentheses as an indication that something is a function.

Also, don't confuse the reader by alluding to potential future alternatives to value().

Reviewers: is this an improvement? It's a draft PR for now until we decide the change is worthwhile.

cabo commented 1 year ago

I think we'll need to explain the () notation, which should be familiar to C programmers but not necessarily to people who grew up on other languages.

I also think we have a few more examples that point to hypothetical functions, such as blt, bar, bnl.

glyn commented 1 year ago

I think we'll need to explain the () notation, which should be familiar to C programmers but not necessarily to people who grew up on other languages.

I don't think there's a great point at which to explain that notation and, based on your observation, I'm going off the idea.

I also think we have a few more examples that point to hypothetical functions, such as blt, bar, bnl.

glyn commented 1 year ago

@cabo Let's see how #456 pans out before taking the current PR any further. Once I remove the function parentheses, the two PRs are changing the same text.

cabo commented 1 year ago

I don't think there's a great point at which to explain that notation

1.1 would be the place.

glyn commented 1 year ago

@cabo:

I think we'll need to explain the () notation, which should be familiar to C programmers but not necessarily to people who grew up on other languages.

As you suggested, I introduced this in 1.1, but near the start since it's notation rather than terminology.

I also think we have a few more examples that point to hypothetical functions, such as blt, bar, bnl.

I did a regexp search to find and fix the remaining examples (your list was complete). In doing so, I found the strange markup wildcard and removed the backticks since there was no good reason for them.