Michael Färber
Michael Färber
Ok, so this history is a bit complicated. Let us consider a slightly different example: `0 | .x`. What does jq say to that? $ jq -c -n '0 |...
Ok, so I am currently drafting a section in the README about smaller differences between jaq and jq. While doing that, I thought more about the case `null | .a...
I updated the README with a few differences in 0d00650, but this is surely not yet exhaustive.
> Another difference to be worth noticing is the behavior of updating with multiple paths; `{} | (.x, .y) = 0`. The application of this simple example makes jq much...
And on a related note: What should `null | .[] = 1` yield? With my proposed interpretation of `null`, I believe that the result should be `null`. But jq yields...
Also, `null | keys` yields an error in jq, while I think that `[]` would be a perfectly fine result.
By the way, my rationale is also consistent with the behaviour that `[] + null` yields `[]` and `{} + null` yields `{}`.
I have a bit more formal specification of what I believe to need to hold for `null` values: I call the neutral values: `false`, `0`, `""`, `[]`, or `{}`. I...
> Your formal specification looks a sophisticated way of reasoning the changes, but I can give a counter example with no explicit branching; `def f(n): n * n > n;`;...
Oh, that is interesting to read! I think it is a pity that your pull request was never integrated ...