xq icon indicating copy to clipboard operation
xq copied to clipboard

Revisit evaluation orderings

Open MiSawa opened this issue 3 years ago • 1 comments

Related to #55, I think we need to revisit all parts of compiler that compiles multiple inner "components" so that the evaluation order of them are the same with that of jq/gojq.

MiSawa avatar Feb 21 '22 16:02 MiSawa

Maybe still different in arguments order?

❯ jq -nc '[1,2,3] | setpath(0,1,2 | [.]; 4,5)'
[4,2,3]
[1,4,3]
[1,2,4]
[5,2,3]
[1,5,3]
[1,2,5]

❯ xq -nc '[1,2,3] | setpath(0,1,2 | [.]; 4,5)'
[4,2,3]
[5,2,3]
[1,4,3]
[1,5,3]
[1,2,4]
[1,2,5]

❯ xq --version
xq 0.2.0-3dc2f51b9f2a022984a912fe72a0dacc35e117ec

itchyny avatar Feb 21 '22 23:02 itchyny